Part Number Hot Search : 
NTE3058 14260C S8050A 0F401 1005C MAX1966 00095 T493X337
Product Description
Full Text Search
 

To Download P89LPC9408FBD Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1. general description the p89lpc9408 is a multi-chip module consisting of a p89lpc938 single-chip microcontroller combined with a pcf8576d universal lcd controller in a low-cost 64-pin package. the lcd controller provides 32 segments and supports from 1 to 4 backplanes. display overhead is minimized by an on-chip display ram with auto-increment addressing. 2. features 2.1 principal features n 8 kb byte-erasable ?ash code memory organized into 1 kb sectors and 64-byte pages. single-byte erasing allows any byte(s) to be used as non-volatile data storage. n 256-byte ram data memory. n 512-byte customer data eeprom on chip allows serialization of devices, storage of set-up parameters, etc. n 32 segment 4 backplane lcd controller supports from 1 to 4 backplanes. n 8-input multiplexed 10-bit adc. two analog comparators with selectable inputs and reference source. n two 16-bit counter/timers (each may be con?gured to toggle a port output upon timer over?ow or to become a pwm output) and a 23-bit system timer that can also be used as a real-time clock (rtc). n enhanced uart with fractional baud rate generator, break detect, framing error detection, and automatic address detection; 400 khz byte-wide i 2 c-bus communication port and spi communication port. n ccu provides pwm, input capture, and output compare functions. n high-accuracy internal rc oscillator option allows operation without external oscillator components. the rc oscillator option is selectable and ?ne tunable. n 64-pin lqfp package with 20 microcontroller i/o pins minimum and up to 23 microcontroller i/o pins while using on-chip oscillator and reset options. 2.2 additional features n 2.4 v to 3.6 v v dd operating range. i/o pins are 5 v tolerant (may be pulled up or driven to 5.5 v). n serial ?ash in-circuit programming (icp) allows simple production coding with commercial eprom programmers. flash security bits prevent reading of sensitive application programs. p89lpc9408 8-bit microcontroller with two-clock 80c51 core 8 kb 3 v byte-erasable ?ash, 32 segment 4 lcd driver, 10-bit adc rev. 01 16 december 2005 product data sheet
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 2 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc n a high performance 80c51 cpu provides instruction cycle times of 111 ns to 222 ns for all instructions except multiply and divide when executing at 18 mhz. this is six times the performance of the standard 80c51 running at the same clock frequency. a lower clock frequency for the same performance results in power savings and reduced emi. n serial ?ash in-system programming (isp) allows coding while the device is mounted in the end application. n in-application programming (iap) of the ?ash code memory. this allows changing the code in a running application. n watchdog timer with separate on-chip oscillator, requiring no external components. the watchdog prescaler is selectable from eight values. n low voltage detect (brownout) allows a graceful system shutdown when power fails. may optionally be con?gured as an interrupt. n idle and two different power-down reduced power modes. improved wake-up from power-down mode (a low interrupt input starts execution). typical power-down current is 9 m a typical (total power-down with voltage comparators disabled). n active-low reset. on-chip power-on reset allows operation without external reset components. a reset counter and reset glitch suppression circuitry prevent spurious and incomplete resets. a software reset function is also available. n con?gurable on-chip oscillator with frequency range options selected by user programmed ?ash con?guration bits. oscillator options support frequencies from 20 khz to the maximum operating frequency of 18 mhz. n oscillator fail detect. the watchdog timer has a separate fully on-chip oscillator allowing it to perform an oscillator fail detect function. n programmable port output con?guration options: quasi-bidirectional, open drain, push-pull, input-only. n port input pattern match detect. port 0 may generate an interrupt when the value of the pins match or do not match a programmable pattern. n led drive capability (20 ma) on all port pins. a maximum limit is speci?ed for the entire chip. n controlled slew rate port outputs to reduce emi. outputs have approximately 10 ns minimum ramp times. n only power and ground connections are required to operate the p89lpc9408 when internal reset option is selected. n four interrupt priority levels. n eight keypad interrupt inputs, plus two additional external interrupt inputs. n schmitt trigger port inputs. n second data pointer.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 3 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 3. ordering information 3.1 ordering options 4. block diagram table 1: ordering information type number package name description version P89LPC9408FBD lqfp64 plastic low pro?le quad ?at package; 64 leads; body 14 14 1.4 mm sot791-1 table 2: part options type number flash memory temperature range frequency P89LPC9408FBD 8 kb - 40 cto+85 c 0 mhz to 18 mhz fig 1. block diagram a[2:0] sa0 scl, sda scl_lcd, sda_lcd osc v lcd p89lpc938 mcu pcf8576d lcd controller p3[1:0] p2.5, p2[3:0] p1[7:0] p0[7:0] s[31:0] bp[3:0] 002aab775
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 4 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc fig 2. microcontroller section block diagram accelerated 2-clock 80c51 cpu 8 kb code flash 256-byte data ram port 2 configurable i/os port 1 configurable i/os port 0 configurable i/os keypad interrupt programmable oscillator divider cpu clock configurable oscillator on-chip rc oscillator internal bus crystal or resonator power monitor (power-on reset, brownout reset) 002aab106 uart analog comparators 512-byte auxiliary ram i 2 c-bus 512-byte data eeprom port 3 configurable i/os ccu (capture/ compare unit) p89lpc938 watchdog timer and oscillator timer 0 timer 1 real-time clock/ system timer spi adc0 p3[1:0] p2[7:0] p1[7:0] p0[7:0] x2 x1 txd rxd scl sda t0 t1 cmp2 cin2b cin2a cmp1 cin1a cin1b oca ocb occ ocd ica ad00 ad01 ad02 ad03 ad04 ad05 ad06 ad07 icb spiclk mosi miso ss
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 5 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 5. functional diagram fig 3. lcd display controller block diagram 002aab470 lcd voltage selector backplane outputs input bank selector power- on reset display ram 40 4 bits output bank selector sub- address counter data pointer blinker timing oscillator display controller command decoder i 2 c-bus controller input filters display segment outputs lcd bias generator bp0 a0 a1 a2 bp1 bp2 bp3 s0 to s39 display latch shift register sa0 sda scl osc sync clk v ss v dd v lcd fig 4. p89lpc9408 functional diagram v dd v ss port 0 port 3 txd rxd t0 int0 int1 rst scl sda 002aab776 cmp2 cin2b cin2a cin1b cin1a cmpref cmp1 t1 xtal2 xtal1 kbi0 kbi1 kbi2 kbi3 kbi4 kbi5 kbi6 kbi7 mosi miso ss spiclk ad00 ad01 ad02 ad03 ad05 port 1 port 2 p89lpc9408 ocb occ icb ocd oca ica ad04 ad07 ad06 clkout
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 6 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 6. pinning information 6.1 pinning 6.2 pin description fig 5. pin con?guration p89lpc9408 p0.5/cmpref/kbi5 s17 p0.4/cin1a/kbi4/ad03 s16 p0.3/cin1b/kbi3/ad02 s15 p0.2/cin2a/kbi2/ad01 s14 p0.1/cin2b/kbi1/ad00 s13 p2.0/icb/ad07 s12 p2.1/ocd/ad06 s11 p0.0/cmp2/kbi0/ad05 s10 p1.7/occ/ad04 s9 p1.6/ocb s8 p1.5/rst s7 v ss s6 p3.1/xtal1 s5 p3.0/xtal2/clkout s4 p1.4/int1 s3 p1.3/int0/sda s2 p1.2/t0/scl scl_lcd p2.2/mosi sda_lcd p2.3/miso s31 p2.5/spiclk s30 p1.1/rxd s29 p1.0/txd s28 p0.7/t1/kbi7 s27 p0.6/cmp1/kbi6 s26 v dd s25 v lcd s24 bp0 s23 bp2 s22 bp1 s21 bp3 s20 s0 s19 s1 s18 002aab777 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 table 3: pin description symbol pin type description p0.0 to p0.7 i/o port 0: port 0 is an 8-bit i/o port with a user-con?gurable output type. during reset port 0 latches are con?gured in the input only mode with the internal pull-up disabled. the operation of port 0 pins as inputs and outputs depends upon the port con?guration selected. each port pin is con?gured independently. refer to section 7.13.1 p or t con? gur ations and t ab le 12 static electr ical char acter istics for details. the keypad interrupt feature operates with port 0 pins. all pins have schmitt trigger inputs. port 0 also provides various special functions as described below:
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 7 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc p0.0/cmp2/ kbi0/ad05 8 i/o p0.0 port 0 bit 0. o cmp2 comparator 2 output. i kbi0 keyboard input 0. i ad05 adc0 channel 5 analog input. p0.1/cin2b/ kbi1/ad00 5 i/o p0.1 port 0 bit 1. i cin2b comparator 2 positive input b. i kbi1 keyboard input 1. i ad00 adc0 channel 0 analog input. p0.2/cin2a/ kbi2/ad01 4 i/o p0.2 port 0 bit 2. i cin2a comparator 2 positive input a. i kbi2 keyboard input 2. i ad01 adc0 channel 1 analog input. p0.3/cin1b/ kbi3/ad02 3 i/o p0.3 port 0 bit 3. i cin1b comparator 1 positive input b. i kbi3 keyboard input 3. i ad02 adc0 channel 2 analog input. p0.4/cin1a/ kbi4/ad03 2 i/o p0.4 port 0 bit 4. i cin1a comparator 1 positive input a. i kbi4 keyboard input 4. i ad03 adc0 channel 3 analog input. p0.5/ cmpref/ kbi5 1 i/o p0.5 port 0 bit 5. i cmpref comparator reference (negative) input. i kbi5 keyboard input 5. p0.6/cmp1/ kbi6 24 i/o p0.6 port 0 bit 6. o cmp1 comparator 1 output. i kbi6 keyboard input 6. p0.7/t1/kbi7 23 i/o p0.7 port 0 bit 7. i/o t1 timer/counter 1 external count input or over?ow output. i kbi7 keyboard input 7. p1.0 to p1.7 i/o, i [1] port 1: port 1 is an 8-bit i/o port with a user-con?gurable output type, except for three pins as noted below. during reset port 1 latches are con?gured in the input only mode with the internal pull-up disabled. the operation of the con?gurable port 1 pins as inputs and outputs depends upon the port con?guration selected. each of the con?gurable port pins are programmed independently. refer to section 7.13.1 p or t con? gur ations and t ab le 12 static electr ical char acter istics for details. p1.2 and p1.3 are open drain when used as outputs. p1.5 is input only. all pins have schmitt trigger inputs. port 1 also provides various special functions as described below: p1.0/txd 22 i/o p1.0 port 1 bit 0. o txd transmitter output for the serial port. p1.1/rxd 21 i/o p1.1 port 1 bit 1. i rxd receiver input for the serial port. table 3: pin description continued symbol pin type description
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 8 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc p1.2/t0/scl 17 i/o p1.2 port 1 bit 2 (open-drain when used as output). i/o t0 timer/counter 0 external count input or over?ow output (open-drain when used as output). i/o scl i 2 c-bus serial clock input/output. p1.3/ int0/ sda 16 i/o p1.3 port 1 bit 3 (open-drain when used as output). i int0 external interrupt 0 input. i/o sda i 2 c-bus serial data input/output. p1.4/ int1 15 i p1.4 port 1 bit 4. i int1 external interrupt 1 input. p1.5/ rst 11 i p1.5 port 1 bit 5 (input only). i rst external reset input during power-on or if selected via ucfg1. when functioning as a reset input, a low on this pin resets the microcontroller, causing i/o ports and peripherals to take on their default states, and the processor begins execution at address 0. also used during a power-on sequence to force isp mode. when using an oscillator frequency above 12 mhz, the reset input function of p1.5 must be enabled. an external circuit is required to hold the device in reset at power-up until v dd has reached its speci?ed level. when system power is removed v dd will fall below the minimum speci?ed operating voltage. when using an oscillator frequency above 12 mhz, in some applications, an external brownout detect circuit may be required to hold the device in reset when v dd falls below the minimum speci?ed operating range. p1.6/ocb 10 i/o p1.6 port 1 bit 6. o ocb output compare b. p1.7/occ/ ad04 9 i/o p1.7 port 1 bit 7. o occ output compare c. i ad04 adc0 channel 4 analog input. p2.0 to p2.3, p2.5 i/o port 2: port 2 is an 5-bit i/o port with a user-con?gurable output type. during reset port 2 latches are con?gured in the input only mode with the internal pull-up disabled. the operation of port 2 pins as inputs and outputs depends upon the port con?guration selected. each port pin is con?gured independently. refer to section 7.13.1 p or t con? gur ations and t ab le 12 static electr ical char acter istics for details. all pins have schmitt trigger inputs. port 2 also provides various special functions as described below: p2.0/icb/ ad07 6 i/o p2.0 port 2 bit 0. i icb input capture b. i ad07 adc0 channel 7 analog input. p2.1/ocd/ ad06 7 i/o p2.1 port 2 bit 1. o ocd output compare d. i ad06 adc0 channel 6 analog input. p2.2/mosi 18 i/o p2.2 port 2 bit 2. i/o mosi spi master out slave in. when con?gured as master, this pin is output; when con?gured as slave, this pin is input. p2.3/miso 19 i/o p2.3 port 2 bit 3. i/o miso when con?gured as master, this pin is input, when con?gured as slave, this pin is output. table 3: pin description continued symbol pin type description
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 9 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] input/output for p1.0 to p1.4, p1.6, p1.7. input for p1.5. p2.5/spiclk 20 i/o p2.5 port 2 bit 5. i/o spiclk spi clock. when con?gured as master, this pin is output; when con?gured as slave, this pin is input. p3.0 to p3.1 i/o port 3: port 3 is a 2-bit i/o port with a user-con?gurable output type. during reset port 3 latches are con?gured in the input only mode with the internal pull-up disabled. the operation of port 3 pins as inputs and outputs depends upon the port con?guration selected. each port pin is con?gured independently. refer to section 7.13.1 p or t con? gur ations and t ab le 12 static electr ical char acter istics for details. all pins have schmitt triggered inputs. port 3 also provides various special functions as described below: p3.0/xtal2/ clkout 14 i/o p3.0 port 3 bit 0. o xtal2 output from the oscillator ampli?er (when a crystal oscillator option is selected via the ?ash con?guration. o clkout cpu clock divided by 2 when enabled via sfr bit (enclk -trim.6). it can be used if the cpu clock is the internal rc oscillator, watchdog oscillator or external clock input, except when xtal1/xtal2 are used to generate clock source for the rtc/system timer. p3.1/xtal1 13 i/o p3.1 port 3 bit 1. i xtal1 input to the oscillator circuit and internal clock generator circuits (when selected via the ?ash con?guration). it can be a port pin if internal rc oscillator or watchdog oscillator is used as the cpu clock source, and if xtal1/xtal2 are not used to generate the clock for the rtc/system timer. sda_lcd 63 i/o sda lcd i 2 c-bus data signal for the lcd controller. scl_lcd 64 i scl lcd i 2 c-bus clock signal for the lcd controller. bp0 to bp3 27 to 30 o bp0 to bp3: lcd backplane outputs. s0 to s31 31 to 62 o s0 to s31: lcd segment outputs v ss 12 i ground: 0 v reference. v dd 25 i power supply: this is the power supply voltage for normal operation as well as idle and power-down modes. v lcd 26 i lcd power supply: lcd supply voltage. table 3: pin description continued symbol pin type description
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 10 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7. functional description remark: please refer to the p89lpc9408 user manual for a more detailed functional description. 7.1 special function registers remark: sfr accesses are restricted in the following ways: ? user must not attempt to access any sfr locations not de?ned. ? accesses to any de?ned sfr locations must be strictly for the functions for the sfrs. ? sfr bits labeled -, 0 or 1 can only be written and read as follows: C - unless otherwise speci?ed, must be written with 0, but can return any value when read (even if it was written with 0). it is a reserved bit and may be used in future derivatives. C 0 must be written with 0, and will return a 0 when read. C 1 must be written with 1, and will return a 1 when read.
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 11 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc table 4: special function registers * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary bit address e7 e6 e5 e4 e3 e2 e1 e0 acc* accumulator e0h 00 0000 0000 ad0con adc0 control register 97h enbi0 enadci0 tmm0 edge0 adci0 enadc0 adcs01 adcs00 00 0000 0000 ad0ins adc0 input select a3h adi07 adi06 adi05 adi04 adi03 adi02 adi01 adi00 00 0000 0000 ad0moda adc0 mode register a c0h bndi0 burst0 scc0 scan0 ----00 0000 0000 ad0modb adc0 mode register b a1h clk2 clk1 clk0 -----00 000x 0000 auxr1 auxiliary function register a2h clklp ebrr ent1 ent0 srst 0 - dps 00 0000 00x0 bit address f7 f6 f5 f4 f3 f2 f1 f0 b* b register f0h 00 0000 0000 brgr0 [1] baud rate generator rate low beh 00 0000 0000 brgr1 [1] baud rate generator rate high bfh 00 0000 0000 brgcon baud rate generator control bdh------ sbrgs brgen 00 [1] xxxx xx00 cccra capture compare a control register eah iceca2 iceca1 iceca0 icesa icnfa fcoa ocma1 ocma0 00 0000 0000 cccrb capture compare b control register ebh icecb2 icecb1 icecb0 icesb icnfb fcob ocmb1 ocmb0 00 0000 0000 cccrc capture compare c control register ech----- fcoc ocmc1 ocmc0 00 xxxx x000 cccrd capture compare d control register edh----- fcod ocmd1 ocmd0 00 xxxx x000 cmp1 comparator 1 control register ach - - ce1 cp1 cn1 oe1 co1 cmf1 00 [2] xx00 0000 cmp2 comparator 2 control register adh - - ce2 cp2 cn2 oe2 co2 cmf2 00 [2] xx00 0000 deecon data eeprom control register f1h eeif hverr ectl1 ectl0 - - - eadr8 0e 0000 1110
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 12 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc deedat data eeprom data register f2h 00 0000 0000 deeadr data eeprom address register f3h 00 0000 0000 divm cpu clock divide-by-m control 95h 00 0000 0000 dptr data pointer (2 bytes) dph data pointer high 83h 00 0000 0000 dpl data pointer low 82h 00 0000 0000 fmadrh program ?ash address high e7h 00 0000 0000 fmadrl program ?ash address low e6h 00 0000 0000 fmcon program ?ash control (read) e4h busy - - - hva hve sv oi 70 0111 0000 program ?ash control (write) e4h fmcmd.7 fmcmd.6 fmcmd.5 fmcmd.4 fmcmd.3 fmcmd.2 fmcmd.1 fmcmd.0 fmdata program ?ash data e5h 00 0000 0000 i2adr i 2 c slave address register dbh i2adr.6 i2adr.5 i2adr.4 i2adr.3 i2adr.2 i2adr.1 i2adr.0 gc 00 0000 0000 bit address df de dd dc db da d9 d8 i2con* i 2 c control register d8h - i2en sta sto si aa - crsel 00 x000 00x0 i2dat i 2 c data register dah i2sclh serial clock generator/scl duty cycle register high ddh 00 0000 0000 i2scll serial clock generator/scl duty cycle register low dch 00 0000 0000 i2stat i 2 c status register d9h sta.4 sta.3 sta.2 sta.1 sta.0 0 0 0 f8 1111 1000 icrah input capture a register high abh 00 0000 0000 table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 13 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc icral input capture a register low aah 00 0000 0000 icrbh input capture b register high afh 00 0000 0000 icrbl input capture b register low aeh 00 0000 0000 bit address af ae ad ac ab aa a9 a8 ien0* interrupt enable 0 a8h ea ewdrt ebo es/esr et1 ex1 et0 ex0 00 0000 0000 bit address ef ee ed ec eb ea e9 e8 ien1* interrupt enable 1 e8h eiee est - eccu espi ec ekbi ei2c 00 [2] 00x0 0000 ien2 interrupt enable 2 d5h ------ eadc - 00 [2] 00x0 0000 bit address bf be bd bc bb ba b9 b8 ip0* interrupt priority 0 b8h - pwdrt pbo ps/psr pt1 px1 pt0 px0 00 [2] x000 0000 ip0h interrupt priority 0 high b7h - pwdrth pboh psh/ psrh pt1h px1h pt0h px0h 00 [2] x000 0000 bit address ff fe fd fc fb fa f9 f8 ip1* interrupt priority 1 f8h padee pst - pccu pspi pc pkbi pi2c 00 [2] 00x0 0000 ip1h interrupt priority 1 high f7h padeeh psth - pccuh pspih pch pkbih pi2ch 00 [2] 00x0 0000 ip2 interrupt priority 2 d6h ------padc-00 [2] 00x0 0000 ip2h interrupt priority 2 high d7h------p adch - 00 [2] 00x0 0000 kbcon keypad control register 94h------patn _sel kbif 00 [2] xxxx xx00 kbmask keypad interrupt mask register 86h 00 0000 0000 kbpatn keypad pattern register ff 1111 1111 ocrah output compare a register high efh 00 0000 0000 ocral output compare a register low eeh 00 0000 0000 table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 14 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc ocrbh output compare b register high fbh 00 0000 0000 ocrbl output compare b register low fah 00 0000 0000 ocrch output compare c register high fdh 00 0000 0000 ocrcl output compare c register low fch 00 0000 0000 ocrdh output compare d register high ffh 00 0000 0000 ocrdl output compare d register low feh 00 0000 0000 bit address 87 86 85 84 83 82 81 80 p0* port 0 80h t1/kb7 cmp1 /kb6 cmpref/ kb5 cin1a /kb4 cin1b /kb3 cin2a /kb2 cin2b /kb1 cmp2 /kb0 [2] bit address 97 96 95 94 93 92 91 90 p1* port 1 90h occ ocb rst int1 int0/sda t0/scl rxd txd [2] bit address 97 96 95 94 93 92 91 90 p2* port 2 a0h ica oca spiclk ss miso mosi ocd icb [2] bit address b7 b6 b5 b4 b3 b2 b1 b0 p3*port3 b0h------xtal1xtal2 [2] p0m1 port 0 output mode 1 84h (p0m1.7) (p0m1.6) (p0m1.5) (p0m1.4) (p0m1.3) (p0m1.2) (p0m1.1) (p0m1.0) ff [2] 1111 1111 p0m2 port 0 output mode 2 85h (p0m2.7) (p0m2.6) (p0m2.5) (p0m2.4) (p0m2.3) (p0m2.2) (p0m2.1) (p0m2.0) 00 [2] 0000 0000 p1m1 port 1 output mode 1 91h (p1m1.7) (p1m1.6) - (p1m1.4) (p1m1.3) (p1m1.2) (p1m1.1) (p1m1.0) d3 [2] 11x1 xx11 p1m2 port 1 output mode 2 92h (p1m2.7) (p1m2.6) - (p1m2.4) (p1m2.3) (p1m2.2) (p1m2.1) (p1m2.0) 00 [2] 00x0 xx00 p2m1 port 2 output mode 1 a4h (p2m1.7) (p2m1.6) (p2m1.5) (p2m1.4) (p2m1.3) (p2m1.2) (p2m1.1) (p2m1.0) ff [2] 1111 1111 p2m2 port 2 output mode 2 a5h (p2m2.7) (p2m2.6) (p2m2.5) (p2m2.4) (p2m2.3) (p2m2.2) (p2m2.1) (p2m2.0) 00 [2] 0000 0000 table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 15 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc p3m1 port 3 output mode 1 b1h------ (p3m1.1) (p3m1.0) 03 [2] xxxx xx11 p3m2 port 3 output mode 2 b2h------ (p3m2.1) (p3m2.0) 00 [2] xxxx xx00 pcon power control register 87h smod1 smod0 bopd boi gf1 gf0 pmod1 pmod0 00 0000 0000 pcona power control register a b5h rtcpd deepd vcpd adpd i2pd sppd spd ccupd 00 [2] 0000 0000 bit address d7 d6 d5 d4 d3 d2 d1 d0 psw* program status word d0h cy ac f0 rs1 rs0 ov f1 p 00 0000 0000 pt0ad port 0 digital input disable f6h - - pt0ad.5 pt0ad.4 pt0ad.3 pt0ad.2 pt0ad.1 - 00 xx00 000x rstsrc reset source register dfh - - bof pof r_bk r_wd r_sf r_ex [3] rtccon rtc control d1h rtcf rtcs1 rtcs0 - - - ertc rtcen 60 [2] [4] 011x xx00 rtch rtc register high d2h 00 [4] 0000 0000 rtcl rtc register low d3h 00 [4] 0000 0000 saddr serial port address register a9h 00 0000 0000 saden serial port address enable b9h 00 0000 0000 sbuf serial port data buffer register 99h xx xxxx xxxx bit address 9f 9e 9d 9c 9b 9a 99 98 scon* serial port control 98h sm0/fe sm1 sm2 ren tb8 rb8 ti ri 00 0000 0000 sstat serial port extended status register bah dbmod intlo cidis dbisel fe br oe stint 00 0000 0000 sp stack pointer 81h 07 0000 0111 spctl spi control register e2h ssig spen dord mstr cpol cpha spr1 spr0 04 0000 0100 spstat spi status register e1h spif wcol ------00 00xx xxxx spdat spi data register e3h 00 0000 0000 table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 16 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc tamod timer 0 and 1 auxiliary mode 8fh - - - t1m2 - - - t0m2 00 xxx0 xxx0 bit address 8f 8e 8d 8c 8b 8a 89 88 tcon* timer 0 and 1 control 88h tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 00 0000 0000 tcr20* ccu control register 0 c8h pleen hltrn hlten altcd altab tdir2 tmod21 tmod20 00 0000 0000 tcr21 ccu control register 1 f9h tcou2 - - - plldv.3 plldv.2 plldv.1 plldv.0 00 0xxx 0000 th0 timer 0 high 8ch 00 0000 0000 th1 timer 1 high 8dh 00 0000 0000 th2 ccu timer high cdh 00 0000 0000 ticr2 ccu interrupt control register c9h toie2 tocie2d tocie2c tocie2b tocie2a - ticie2b ticie2a 00 0000 0x00 tifr2 ccu interrupt ?ag register e9h toif2 tocf2d tocf2c tocf2b tocf2a - ticf2b ticf2a 00 0000 0x00 tise2 ccu interrupt status encode register deh----- encint.2 encint.1 encint.0 00 xxxx x000 tl0 timer 0 low 8ah 00 0000 0000 tl1 timer 1 low 8bh 00 0000 0000 tl2 ccu timer low cch 00 0000 0000 tmod timer 0 and 1 mode 89h t1gate t1c/t t1m1 t1m0 t0gate t0c/t t0m1 t0m0 00 0000 0000 tor2h ccu reload register high cfh 00 0000 0000 tor2l ccu reload register low ceh 00 0000 0000 tpcr2h prescaler control register high cbh------ tpcr2h. 1 tpcr2h. 0 00 xxxx xx00 tpcr2l prescaler control register low cah tpcr2l.7 tpcr2l.6 tpcr2l.5 tpcr2l.4 tpcr2l.3 tpcr2l.2 tpcr2l.1 tpcr2l.0 00 0000 0000 trim internal oscillator trim register 96h rcclk enclk trim.5 trim.4 trim.3 trim.2 trim.1 trim.0 [4] [5] table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 17 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] brgr1 and brgr0 must only be written if brgen in brgcon sfr is logic 0. if any are written while brgen = 1, the result is unpre dictable. [2] all ports are in input only (high-impedance) state after power-up. [3] the rstsrc register re?ects the cause of the p89lpc9408 reset. upon a power-up reset, all reset source ?ags are cleared exce pt pof and bof; the power-on reset value is xx11 0000. [4] the only reset source that affects these sfrs is power-on reset. [5] on power-on reset, the trim sfr is initialized with a factory preprogrammed value. other resets will not cause initializatio n of the trim register. [6] after reset, the value is 111001x1, i.e., pre2 to pre0 are all logic 1, wdrun = 1 and wdclk = 1. wdtof bit is logic 1 after watchdog reset and is logic 0 aft er power-on reset. other resets will not affect wdtof. wdcon watchdog control register a7h pre2 pre1 pre0 - - wdrun wdtof wdclk [4] [6] wdl watchdog load c1h ff 1111 1111 wfeed1 watchdog feed 1 c2h wfeed2 watchdog feed 2 c3h table 4: special function registers continued * indicates sfrs that are bit addressable. name description sfr addr. bit functions and addresses reset value msb lsb hex binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 18 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc table 5: p89lpc938 extended special function registers name description sfr addr. bit functions and addresses reset value msb lsb hex binary adc0hbnd adc0 high _boundary register, left (msb) ffefh ff 1111 1111 adc0lbnd adc0 low_boundary register (msb) ffeeh 00 0000 0000 ad0dat0r adc0 data register 0, right (lsb) fffeh ad0dat0[7:0] 00 0000 0000 ad0dat0l adc0 data register 0, left (msb) ffffh ad0dat0[9:2] 00 0000 0000 ad0dat1r adc0 data register 1, right (lsb) fffch ad0dat1[7:0] 00 0000 0000 ad0dat1l adc0 data register 1, left (msb) fffdh ad0dat1[9:2] 00 0000 0000 ad0dat2r adc0 data register 2, right (lsb) fffah ad0dat2[7:0] 00 0000 0000 ad0dat2l adc0 data register 2, left (msb) fffbh ad0dat2[9:2] 00 0000 0000 ad0dat3r adc0 data register 3, right (lsb) fff8h ad0dat3[7:0] 00 0000 0000 ad0dat3l adc0 data register 3, left (msb) fff9h ad0dat3[9:2] 00 0000 0000 ad0dat4r adc0 data register 4, right (lsb) fff6h ad0dat4[7:0] 00 0000 0000 ad0dat4l adc0 data register 4, left (msb) fff7h ad0dat4[9:2] 00 0000 0000 ad0dat5r adc0 data register 5, right (lsb) fff4h ad0dat5[7:0] 00 0000 0000 ad0dat5l adc0 data register 5, left (msb) fff5h ad0dat5[9:2] 00 0000 0000 ad0dat6r adc0 data register 6, right (lsb) fff2h ad0dat6[7:0] 00 0000 0000 ad0dat6l adc0 data register 6, left (msb) fff3h ad0dat6[9:2] 00 0000 0000 ad0dat7r adc0 data register 7, right (lsb) fff0h ad0dat7[7:0] ad0dat7l adc0 data register 7, left (msb) fff1h ad0dat7[9:2] bndsta0 adc0 boundary status register ffedh
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 19 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.2 enhanced cpu the p89lpc9408 uses an enhanced 80c51 cpu which runs at six times the speed of standard 80c51 devices. a machine cycle consists of two cpu clock cycles, and most instructions execute in one or two machine cycles. 7.3 clocks 7.3.1 clock de?nitions the p89lpc9408 device has several internal clocks as de?ned below: oscclk input to the divm clock divider. oscclk is selected from one of four clock sources (see figure 6 ) and can also be optionally divided to a slower frequency (see section 7.8 cclk modi? cation: divm register ). note: f osc is de?ned as the oscclk frequency. cclk cpu clock; output of the clock divider. there are two cclk cycles per machine cycle, and most instructions are executed in one to two machine cycles (two or four cclk cycles). rcclk the internal 7.373 mhz rc oscillator output. pclk clock for the various peripheral devices and is cclk 2 . 7.3.2 cpu clock (oscclk) the p89lpc9408 provides several user-selectable oscillator options in generating the cpu clock. this allows optimization for a range of needs from high precision to lowest possible cost. these options are con?gured when the ?ash is programmed and include an on-chip watchdog oscillator, an on-chip rc oscillator, an oscillator using an external crystal, or an external clock source. the crystal oscillator can be optimized for low, medium, or high frequency crystals covering a range from 20 khz to 18 mhz. 7.3.3 low speed oscillator option this option supports an external crystal in the range of 20 khz to 100 khz. ceramic resonators are also supported in this con?guration. 7.3.4 medium speed oscillator option this option supports an external crystal in the range of 100 khz to 4 mhz. ceramic resonators are also supported in this con?guration. 7.3.5 high speed oscillator option this option supports an external crystal in the range of 4 mhz to 18 mhz. ceramic resonators are also supported in this con?guration. when using an oscillator frequency above 12 mhz, the reset input function of p1.5 must be enabled. an external circuit is required to hold the device in reset at power-up until v dd has reached its speci?ed level. when system power is removed v dd will fall below the minimum speci?ed operating voltage. when using an oscillator frequency above 12 mhz, in some applications, an external brownout detect circuit may be required to hold the device in reset when v dd falls below the minimum speci?ed operating range.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 20 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.3.6 clock output the p89lpc9408 supports a user-selectable clock output function on the xtal2/clkout pin when crystal oscillator is not being used. this condition occurs if another clock source has been selected (on-chip rc oscillator, watchdog oscillator, external clock input on xtal1) and if the rtc is not using the crystal oscillator as its clock source. this allows external devices to synchronize to the p89lpc9408. this output is enabled by the enclk bit in the trim register. the frequency of this clock output is 1 2 that of the cclk. if the clock output is not needed in idle mode, it may be turned off prior to entering idle, saving additional power. 7.4 on-chip rc oscillator option the p89lpc9408 has a 6-bit trim register that can be used to tune the frequency of the rc oscillator. during reset, the trim value is initialized to a factory preprogrammed value to adjust the oscillator frequency to 7.373 mhz 1 % at room temperature. end-user applications can write to the trim register to adjust the on-chip rc oscillator to other frequencies. 7.5 watchdog oscillator option the watchdog has a separate oscillator which has a frequency of 400 khz. this oscillator can be used to save power when a high clock frequency is not needed. 7.6 external clock input option in this con?guration, the processor clock is derived from an external source driving the p3.1/xtal1 pin. the rate may be from 0 hz up to 18 mhz. the p3.0/xtal2 pin may be used as a standard port pin or a clock output. when using an oscillator frequency above 12 mhz, the reset input function of p1.5 must be enabled. an external circuit is required to hold the device in reset at power-up until v dd has reached its speci?ed level. when system power is removed v dd will fall below the minimum speci?ed operating voltage. when using an oscillator frequency above 12 mhz, in some applications, an external brownout detect circuit may be required to hold the device in reset when v dd falls below the minimum speci?ed operating voltage.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 21 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.7 cpu clock (cclk) wake-up delay the p89lpc9408 has an internal wake-up timer that delays the clock until it stabilizes depending on the clock source used. if the clock source is any of the three crystal selections (low, medium and high frequencies) the delay is 992 oscclk cycles plus 60 m sto100 m s. if the clock source is either the internal rc oscillator, watchdog oscillator, or external clock, the delay is 224 oscclk cycles plus 60 m sto100 m s. 7.8 cclk modi?cation: divm register the oscclk frequency can be divided down up to 510 times by con?guring a dividing register, divm, to generate cclk. this feature makes it possible to temporarily run the cpu at a lower rate, reducing power consumption. by dividing the clock, the cpu can retain the ability to respond to events that would not exit idle mode by executing its normal program at a lower rate. this can also allow bypassing the oscillator start-up time in cases where power-down mode would otherwise be used. the value of divm may be changed by the program at any time without interrupting code execution. 7.9 low power select the p89lpc9408 is designed to run at 18 mhz (cclk) maximum. however, if cclk is 8 mhz or slower, the clklp sfr bit (auxr1.7) can be set to logic 1 to lower the power consumption further. on any reset, clklp is logic 0 allowing highest performance access. this bit can then be set in software if cclk is running at 8 mhz or slower. fig 6. block diagram of oscillator control ? 2 002aab102 rtc adc0 cpu wdt divm cclk uart oscclk i 2 c-bus pclk timer 0 and timer 1 high frequency medium frequency low frequency xtal1 xtal2 rc oscillator watchdog oscillator (7.3728 mhz 1 %) pclk rcclk spi ccu 32 pll (400 khz + 30 % - 20 %)
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 22 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.10 memory organization the various p89lpc9408 memory spaces are as follows: ? data 128 bytes of internal data memory space (00h:7fh) accessed via direct or indirect addressing, using instructions other than movx and movc. all or part of the stack may be in this area. ? i data indirect data. 256 bytes of internal data memory space (00h:ffh) accessed via indirect addressing using instructions other than movx and movc. all or part of the stack may be in this area. this area includes the data area and the 128 bytes immediately above it. ? sfr special function registers. selected cpu registers and peripheral control and status registers, accessible only via direct addressing. ? x data external data or auxiliary ram. duplicates the classic 80c51 64 kb memory space addressed via the movx instruction using the dptr, r0, or r1. all or part of this space could be implemented on-chip. the p89lpc9408 has 512 bytes of on-chip xdata memory, plus extended sfrs located in xdata. ? code 64 kb of code memory space, accessed as part of program execution and via the movc instruction. the p89lpc9408 has 8 kb of on-chip code memory. 7.11 data ram arrangement the 768 bytes of on-chip ram are organized as shown in t ab le 6 . 7.12 interrupts the p89lpc9408 uses a four priority level interrupt structure. this allows great ?exibility in controlling the handling of the many interrupt sources. the p89lpc9408 supports 16 interrupt sources: external interrupts 0 and 1, timers 0 and 1, serial port tx, serial port rx, combined serial port rx/tx, brownout detect, watchdog/rtc, i 2 c-bus, keyboard, comparators 1 and 2, spi, ccu, data eeprom write, and adc completion. each interrupt source can be individually enabled or disabled by setting or clearing a bit in the interrupt enable registers ien0, ien1, or ien2. the ien0 register also contains a global disable bit, ea, which disables all interrupts. table 6: on-chip data memory usages type data ram size (bytes) data memory that can be addressed directly and indirectly 128 idata memory that can be addressed indirectly 256 xdata auxiliary (external data) on-chip memory that is accessed using the movx instructions 512
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 23 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc each interrupt source can be individually programmed to one of four priority levels by setting or clearing bits in the interrupt priority registers ip0, ip0h, ip1, ip1h, ip2, and ip2h. an interrupt service routine in progress can be interrupted by a higher priority interrupt, but not by another interrupt of the same or lower priority. the highest priority interrupt service cannot be interrupted by any other interrupt source. if two requests of different priority levels are pending at the start of an instruction, the request of higher priority level is serviced. if requests of the same priority level are pending at the start of an instruction, an internal polling sequence determines which request is serviced. this is called the arbitration ranking. note that the arbitration ranking is only used to resolve pending requests of the same priority level. 7.12.1 external interrupt inputs the p89lpc9408 has two external interrupt inputs as well as the keypad interrupt function. the two interrupt inputs are identical to those present on the standard 80c51 microcontrollers. these external interrupts can be programmed to be level-triggered or edge-triggered by setting or clearing bit it1 or it0 in register tcon. in edge-triggered mode, if successive samples of the intn pin show a high in one cycle and a low in the next cycle, the interrupt request ?ag ien in tcon is set, causing an interrupt request. if an external interrupt is enabled when the p89lpc9408 is put into power-down or idle mode, the interrupt will cause the processor to wake-up and resume operation. refer to section 7.15 p o w er reduction modes for details.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 24 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.13 i/o ports the p89lpc9408 has four i/o ports: port 0 and port 1 are 8-bit ports. port 2 is a 5-bit port. port 3 is a 2-bit port. the exact number of i/o pins available depends upon the clock and reset options chosen, as shown in t ab le 7 . fig 7. interrupt sources, interrupt enables, and power-down wake-up sources 002aab104 ie0 ex0 ie1 ex1 bof ebo kbif ekbi interrupt to cpu wake-up (if in power-down) ewdrt cmf2 cmf1 ec ea (ie0.7) tf1 et1 ti and ri/ri es/esr ti est si ei2c spif espi rtcf ertc (rtccon.1) wdovf tf0 et0 any ccu interrupt eccu eeif eadc eiee enadci0 adci0 enbi1 bndi1 table 7: number of i/o pins available clock source reset option number of i/o pins (not including lcd pins) on-chip oscillator or watchdog oscillator no external reset (except during power-up) 23 external rst pin supported 22
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 25 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] required for operation above 12 mhz. 7.13.1 port con?gurations all but three i/o port pins on the p89lpc9408 may be con?gured by software to one of four types on a bit-by-bit basis. these are: quasi-bidirectional (standard 80c51 port outputs), push-pull, open drain, and input-only. two con?guration registers for each port select the output type for each port pin. 1. p1.5 ( rst) can only be an input and cannot be con?gured. 2. p1.2 (scl/t0) and p1.3 (sda/ int0) may only be con?gured to be either input-only or open-drain. 7.13.1.1 quasi-bidirectional output con?guration quasi-bidirectional output type can be used as both an input and output without the need to recon?gure the port. this is possible because when the port outputs a logic high, it is weakly driven, allowing an external device to pull the pin low. when the pin is driven low, it is driven strongly and able to sink a fairly large current. these features are somewhat similar to an open-drain output except that there are three pull-up transistors in the quasi-bidirectional output that serve different purposes. the p89lpc9408 is a 3 v device, but the pins are 5 v-tolerant. in quasi-bidirectional mode, if a user applies 5 v on the pin, there will be a current ?owing from the pin to v dd , causing extra power consumption. therefore, applying 5 v in quasi-bidirectional mode is discouraged. a quasi-bidirectional port pin has a schmitt trigger input that also has a glitch suppression circuit. 7.13.1.2 open-drain output con?guration the open-drain output con?guration turns off all pull-ups and only drives the pull-down transistor of the port driver when the port latch contains a logic 0. to be used as a logic output, a port con?gured in this manner must have an external pull-up, typically a resistor tied to v dd . an open-drain port pin has a schmitt trigger input that also has a glitch suppression circuit. 7.13.1.3 input-only con?guration the input-only port con?guration has no output drivers. it is a schmitt trigger input that also has a glitch suppression circuit. external clock input no external reset (except during power-up) 22 external rst pin supported [1] 21 low/medium/high speed oscillator (external crystal or resonator) no external reset (except during power-up) 21 external rst pin supported [1] 20 table 7: number of i/o pins available continued clock source reset option number of i/o pins (not including lcd pins)
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 26 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.13.1.4 push-pull output con?guration the push-pull output con?guration has the same pull-down structure as both the open-drain and the quasi-bidirectional output modes, but provides a continuous strong pull-up when the port latch contains a logic 1. the push-pull mode may be used when more source current is needed from a port output. a push-pull port pin has a schmitt trigger input that also has a glitch suppression circuit. 7.13.2 port 0 analog functions the p89lpc9408 incorporates two analog comparators. in order to give the best analog function performance and to minimize power consumption, pins that are being used for analog functions must have the digital outputs and digital inputs disabled. digital outputs are disabled by putting the port output into the input-only (high-impedance) mode. digital inputs on port 0 may be disabled through the use of the pt0ad register, bits 1:5. on any reset, pt0ad[1:5] defaults to logic 0s to enable digital functions. 7.13.3 additional port features after power-up, all pins are in input-only mode. please note that this is different from the lpc76x series of devices. ? after power-up, all i/o pins except p1.5, may be con?gured by software. ? pin p1.5 is input only. pins p1.2 and p1.3 and are con?gurable for either input-only or open-drain. every output on the p89lpc9408 has been designed to sink typical led drive current. however, there is a maximum total output current for all ports which must not be exceeded. please refer to t ab le 12 static electr ical char acter istics for detailed speci?cations. all ports pins that can function as an output have slew rate controlled outputs to limit noise generated by quickly switching output signals. the slew rate is factory-set to approximately 10 ns rise and fall times. 7.14 power monitoring functions the p89lpc9408 incorporates power monitoring functions designed to prevent incorrect operation during initial power-up and power loss or reduction during operation. this is accomplished with two hardware functions: power-on detect and brownout detect. 7.14.1 brownout detection the brownout detect function determines if the power supply voltage drops below a certain level. the default operation is for a brownout detection to cause a processor reset, however it may alternatively be con?gured to generate an interrupt. brownout detection may be enabled or disabled in software. if brownout detection is enabled the brownout condition occurs when v dd falls below the brownout trip voltage, v bo (see t ab le 12 static electr ical char acter istics ), and is negated when v dd rises above v bo . if the p89lpc9408 device is to operate with a power supply
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 27 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc that can be below 2.7 v, boe should be left in the unprogrammed state so that the device can operate at 2.4 v, otherwise continuous brownout reset may prevent the device from operating. for correct activation of brownout detect, the v dd rise and fall times must be observed. please see t ab le 12 static electr ical char acter istics for speci?cations. 7.14.2 power-on detection the power-on detect has a function similar to the brownout detect, but is designed to work as power comes up initially, before the power supply voltage reaches a level where brownout detect can work. the pof ?ag in the rstsrc register is set to indicate an initial power-up condition. the pof ?ag will remain set until cleared by software. 7.15 power reduction modes the p89lpc9408 supports three different power reduction modes. these modes are idle mode, power-down mode, and total power-down mode. 7.15.1 idle mode idle mode leaves peripherals running in order to allow them to activate the processor when an interrupt is generated. any enabled interrupt source or reset may terminate idle mode. 7.15.2 power-down mode the power-down mode stops the oscillator in order to minimize power consumption. the p89lpc9408 exits power-down mode via any reset, or certain interrupts. in power-down mode, the power supply voltage may be reduced to the ram keep-alive voltage v ram . this retains the ram contents at the point where power-down mode was entered. sfr contents are not guaranteed after v dd has been lowered to v ram , therefore it is highly recommended to wake up the processor via reset in this case. v dd must be raised to within the operating range before the power-down mode is exited. some chip functions continue to operate and draw power during power-down mode, increasing the total power used during power-down. these include: brownout detect, watchdog timer, comparators (note that comparators can be powered-down separately), and rtc/system timer. the internal rc oscillator is disabled unless both the rc oscillator has been selected as the system clock and the rtc is enabled. 7.15.3 total power-down mode this is the same as power-down mode except that the brownout detection circuitry and the voltage comparators are also disabled to conserve additional power. the internal rc oscillator is disabled unless both the rc oscillator has been selected as the system clock and the rtc is enabled. if the internal rc oscillator is used to clock the rtc during power-down, there will be high power consumption. please use an external low frequency clock to achieve low power with the rtc running during power-down. 7.16 reset the p1.5/ rst pin can function as either an active-low reset input or as a digital input, p1.5. the rpe (reset pin enable) bit in ucfg1, when set to logic 1, enables the external reset input function on p1.5. when cleared, p1.5 may be used as an input pin.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 28 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc remark: during a power-up sequence, the rpe selection is overridden and this pin will always function as a reset input. an external circuit connected to this pin should not hold this pin low during a power-on sequence as this will keep the device in reset. after power-up this input will function either as an external reset input or as a digital input as de?ned by the rpe bit. only a power-up reset will temporarily override the selection de?ned by rpe bit. other sources of reset will not override the rpe bit. reset can be triggered from the following sources: ? external reset pin (during power-up or if user con?gured via ucfg1). ? power-on detect. ? brownout detect. ? watchdog timer. ? software reset. ? uart break character detect reset. for every reset source, there is a ?ag in the reset register, rstsrc. the user can read this register to determine the most recent reset source. these ?ag bits can be cleared in software by writing a logic 0 to the corresponding bit. more than one ?ag bit may be set: ? during a power-on reset, both pof and bof are set but the other ?ag bits are cleared. ? for any other reset, previously set ?ag bits that have not been cleared will remain set. 7.16.1 reset vector following reset, the p89lpc9408 will fetch instructions from either address 0000h or the boot address. the boot address is formed by using the boot vector as the high byte of the address and the low byte of the address = 00h. the boot address will be used if a uart break reset occurs, or the non-volatile boot status bit (boots tat.0) = 1, or the device is forced into isp mode during power-on (see p89lpc9408 user manual ). otherwise, instructions will be fetched from address 0000h. 7.17 timers/counters 0 and 1 the p89lpc9408 has two general purpose counter/timers which are upward compatible with the standard 80c51 timer 0 and timer 1. both can be con?gured to operate either as timers or event counter. an option to automatically toggle the t0 and/or t1 pins upon timer over?ow has been added. in the timer function, the register is incremented every machine cycle. in the counter function, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, t0 or t1. in this function, the external input is sampled once during every machine cycle. timer 0 and timer 1 have ?ve operating modes (modes 0, 1, 2, 3 and 6). modes 0, 1, 2 and 6 are the same for both timers/counters. mode 3 is different.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 29 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.17.1 mode 0 putting either timer into mode 0 makes it look like an 8048 timer, which is an 8-bit counter with a divide-by-32 prescaler. in this mode, the timer register is con?gured as a 13-bit register. mode 0 operation is the same for timer 0 and timer 1. 7.17.2 mode 1 mode 1 is the same as mode 0, except that all 16 bits of the timer register are used. 7.17.3 mode 2 mode 2 con?gures the timer register as an 8-bit counter with automatic reload. mode 2 operation is the same for timer 0 and timer 1. 7.17.4 mode 3 when timer 1 is in mode 3 it is stopped. timer 0 in mode 3 forms two separate 8-bit counters and is provided for applications that require an extra 8-bit timer. when timer 1 is in mode 3 it can still be used by the serial port as a baud rate generator. 7.17.5 mode 6 in this mode, the corresponding timer can be changed to a pwm with a full period of 256 timer clocks. 7.17.6 timer over?ow toggle output timers 0 and 1 can be con?gured to automatically toggle a port output whenever a timer over?ow occurs. the same device pins that are used for the t0 and t1 count inputs are also used for the timer toggle outputs. the port outputs will be a logic 1 prior to the ?rst timer over?ow when this mode is turned on. 7.18 rtc/system timer the p89lpc9408 has a simple rtc that allows a user to continue running an accurate timer while the rest of the device is powered-down. the rtc can be a wake-up or an interrupt source. the rtc is a 23-bit down counter comprised of a 7-bit prescaler and a 16-bit loadable down counter. when it reaches all logic 0s, the counter will be reloaded again and the rtcf ?ag will be set. the clock source for this counter can be either the cpu clock (cclk) or the xtal oscillator, provided that the xtal oscillator is not being used as the cpu clock. if the xtal oscillator is used as the cpu clock, then the rtc will use cclk as its clock source. only power-on reset will reset the rtc and its associated sfrs to the default state. 7.19 ccu this unit features: ? a 16-bit timer with 16-bit reload on over?ow. ? selectable clock, with prescaler to divide clock source by any integral number between 1 and 1024. ? four compare/pwm outputs with selectable polarity ? symmetrical/asymmetrical pwm selection ? two capture inputs with event counter and digital noise rejection ?lter
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 30 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc ? seven interrupts with common interrupt vector (one over?ow, two capture, four compare) ? safe 16-bit read/write via shadow registers. 7.19.1 ccu clock (ccuclk) the ccu runs on the ccuclk, which is either pclk in basic timer mode, or the output of a pll. the pll is designed to use a clock source between 0.5 mhz to 1 mhz that is multiplied by 32 to produce a ccuclk between 16 mhz and 32 mhz in pwm mode (asymmetrical or symmetrical). the pll contains a 4-bit divider to help divide pclk into a frequency between 0.5 mhz and 1 mhz. 7.19.2 ccu clock prescaling this ccuclk can further be divided down by a prescaler. the prescaler is implemented as a 10-bit free-running counter with programmable reload at over?ow. 7.19.3 basic timer operation the timer is a free-running up/down counter with a direction control bit. if the timer counting direction is changed while the counter is running, the count sequence will be reversed. the timer can be written or read at any time. when a reload occurs, the ccu timer over?ow interrupt flag will be set, and an interrupt generated if enabled. the 16-bit ccu timer may also be used as an 8-bit up/down timer. 7.19.4 output compare there are four output compare channels a, b, c and d. each output compare channel needs to be enabled in order to operate and the user will have to set the associated i/o pin to the desired output mode to connect the pin. when the contents of the timer matches that of a capture compare control register, the timer output compare interrupt flag (tocfx) becomes set. an interrupt will occur if enabled. 7.19.5 input capture input capture is always enabled. each time a capture event occurs on one of the two input capture pins, the contents of the timer is transferred to the corresponding 16-bit input capture register. the capture event can be programmed to be either rising or falling edge triggered. a simple noise ?lter can be enabled on the input capture by enabling the input capture noise filter bit. if set, the capture logic needs to see four consecutive samples of the same value in order to recognize an edge as a capture event. an event counter can be set to delay a capture by a number of capture events. 7.19.6 pwm operation pwm operation has two main modes, symmetrical and asymmetrical. in asymmetrical pwm operation the ccu timer operates in down-counting mode regardless of the direction control bit. in symmetrical mode, the timer counts up/down alternately. the main difference from basic timer operation is the operation of the compare module, which in pwm mode is used for pwm waveform generation.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 31 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc as with basic timer operation, when the pwm (compare) pins are connected to the compare logic, their logic state remains unchanged. however, since bit fcox is used to hold the halt value, only a compare event can change the state of the pin. fig 8. asymmetrical pwm, down-counting fig 9. symmetrical pwm tor2 compare value timer value non-inverted inverted 0x0000 002aaa893 tor2 compare value timer value non-inverted inverted 002aaa894 0
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 32 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.19.7 alternating output mode in asymmetrical mode, the user can set up pwm channels a/b and c/d as alternating pairs for bridge drive control. in this mode the output of these pwm channels are alternately gated on every counter cycle. 7.19.8 pll operation the pwm module features a phase locked loop that can be used to generate a ccuclk frequency between 16 mhz and 32 mhz. at this frequency the pwm module provides ultrasonic pwm frequency with 10-bit resolution provided that the crystal frequency is 1 mhz or higher. the pll is fed an input signal of 0.5 mhz to 1 mhz and generates an output signal of 32 times the input frequency. this signal is used to clock the timer. the user will have to set a divider that scales pclk by a factor of 1 to 16. this divider is found in the sfr register tcr21. the pll frequency can be expressed as shown in equation 1 . (1) where: n is the value of plldv3:0. since n ranges in 0 to 15, the cclk frequency can be in the range of pclk to pclk 16 . fig 10. alternate output mode timer value 002aaa895 0 tor2 compare value a (or c) compare value b (or d) pwm output (oca or occ) pwm output (ocb or ocd) pll frequency plck n1 + () ------------------ =
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 33 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.19.9 ccu interrupts there are seven interrupt sources on the ccu which share a common interrupt vector. 7.20 uart the p89lpc9408 has an enhanced uart that is compatible with the conventional 80c51 uart except that timer 2 over?ow cannot be used as a baud rate source. the p89lpc9408 does include an independent baud rate generator. the baud rate can be selected from the oscillator (divided by a constant), timer 1 over?ow, or the independent baud rate generator. in addition to the baud rate generation, enhancements over the standard 80c51 uart include framing error detection, automatic address recognition, selectable double buffering and several interrupt options. the uart can be operated in four modes: shift register, 8-bit uart, 9-bit uart, and cpu clock/32 or cpu clock/16. 7.20.1 mode 0 serial data enters and exits through rxd. txd outputs the shift clock. 8 bits are transmitted or received, lsb ?rst. the baud rate is ?xed at 1 16 of the cpu clock frequency. 7.20.2 mode 1 10 bits are transmitted (through txd) or received (through rxd): a start bit (logic 0), 8 data bits (lsb ?rst), and a stop bit (logic 1). when data is received, the stop bit is stored in rb8 in special function register scon. the baud rate is variable and is determined by the timer 1 over?ow rate or the baud rate generator (described in section 7.20.5 baud r ate gener ator and selection ). fig 11. ccu interrupts 002aaa896 interrupt to cpu toie2 (ticr2.7) toif2 (tifr2.7) ticie2a (ticr2.0) ticf2a (tifr2.0) ticie2b (ticr2.1) ticf2b (tifr2.1) tocie2a (ticr2.3) tocf2a (tifr2.3) tocie2b (ticr2.4) tocf2b (tifr2.4) tocie2c (ticr2.5) tocf2c (tifr2.5) tocie2d (ticr2.6) tocf2d (tifr2.6) ea (ien0.7) eccu (ien1.4) priority encoder other interrupt sources encint.0 encint.1 encint.2
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 34 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.20.3 mode 2 11 bits are transmitted (through txd) or received (through rxd): start bit (logic 0), 8 data bits (lsb ?rst), a programmable 9 th data bit, and a stop bit (logic 1). when data is transmitted, the 9 th data bit (tb8 in scon) can be assigned the value of logic 0 or logic 1. or, for example, the parity bit (p, in the psw) could be moved into tb8. when data is received, the 9 th data bit goes into rb8 in special function register scon, while the stop bit is not saved. the baud rate is programmable to either 1 16 or 1 32 of the cpu clock frequency, as determined by the smod1 bit in pcon. 7.20.4 mode 3 11 bits are transmitted (through txd) or received (through rxd): a start bit (logic 0), 8 data bits (lsb ?rst), a programmable 9 th data bit, and a stop bit (logic 1). in fact, mode 3 is the same as mode 2 in all respects except baud rate. the baud rate in mode 3 is variable and is determined by the timer 1 over?ow rate or the baud rate generator (described in section 7.20.5 baud r ate gener ator and selection ). 7.20.5 baud rate generator and selection the p89lpc9408 enhanced uart has an independent baud rate generator. the baud rate is determined by a baud rate preprogrammed into the brgr1 and brgr0 sfrs which together form a 16-bit baud rate divisor value that works in a similar manner as timer 1 but is much more accurate. if the baud rate generator is used, timer 1 can be used for other timing functions. the uart can use either timer 1 or the baud rate generator output (see figure 12 ). note that timer t1 is further divided by 2 if the smod1 bit (pcon.7) is cleared. the independent baud rate generator uses oscclk. 7.20.6 framing error framing error is reported in the status register (sstat). in addition, if smod0 (pcon.6) is logic 1, framing errors can be made available in scon.7 respectively. if smod0 is logic 0, scon.7 is sm0. it is recommended that sm0 and sm1 (scon[7:6]) are set up when smod0 is logic 0. 7.20.7 break detect break detect is reported in the status register (sstat). a break is detected when 11 consecutive bits are sensed low. the break detect can be used to reset the device and force the device into isp mode. fig 12. baud rate sources for uart (modes 1, 3) baud rate modes 1 and 3 sbrgs = 1 sbrgs = 0 smod1 = 0 smod1 = 1 timer 1 overflow (pclk-based) baud rate generator (cclk-based) 002aaa897 ? 2
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 35 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.20.8 double buffering the uart has a transmit double buffer that allows buffering of the next character to be written to sbuf while the ?rst character is being transmitted. double buffering allows transmission of a string of characters with only one stop bit between any two characters, as long as the next character is written between the start bit and the stop bit of the previous character. double buffering can be disabled. if disabled (dbmod, i.e., ss tat. 7 = 0), the uart is compatible with the conventional 80c51 uart. if enabled, the uart allows writing to sbuf while the previous data is being shifted out. double buffering is only allowed in modes 1, 2 and 3. when operated in mode 0, double buffering must be disabled (dbmod = 0). 7.20.9 transmit interrupts with double buffering enabled (modes 1, 2 and 3) unlike the conventional uart, in double buffering mode, the tx interrupt is generated when the double buffer is ready to receive new data. 7.20.10 the 9 th bit (bit 8) in double buffering (modes 1, 2 and 3) if double buffering is disabled tb8 can be written before or after sbuf is written, as long as tb8 is updated some time before that bit is shifted out. tb8 must not be changed until the bit is shifted out, as indicated by the tx interrupt. if double buffering is enabled, tb8 must be updated before sbuf is written, as tb8 will be double-buffered together with sbuf data. 7.21 i 2 c-bus serial interface the i 2 c-bus uses two wires (sda and scl) to transfer information between devices connected to the bus, and it has the following features: ? bidirectional data transfer between masters and slaves ? multi master bus (no central master) ? arbitration between simultaneously transmitting masters without corruption of serial data on the bus ? serial clock synchronization allows devices with different bit rates to communicate via one serial bus ? serial clock synchronization can be used as a handshake mechanism to suspend and resume serial transfer ? the i 2 c-bus may be used for test and diagnostic purposes. a typical i 2 c-bus con?guration is shown in figure 13 . the p89lpc9408 device provides a byte-oriented i 2 c-bus interface that supports data transfers up to 400 khz.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 36 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc fig 13. i 2 c-bus con?guration other device with i 2 c-bus interface sda scl r pu r pu other device with i 2 c-bus interface p1.3/sda p1.2/scl i 2 c mcu i 2 c-bus 002aab410
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 37 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc fig 14. i 2 c-bus serial interface block diagram - p89lpc9408 internal bus 002aaa899 address register comparator shift register 8 i2adr ack bit counter / arbitration & sync logic 8 i2dat timing and control logic serial clock generator cclk interrupt input filter output stage input filter output stage p1.3 p1.3/sda p1.2/scl p1.2 timer 1 overflow control registers & scl duty cycle registers i2con i2sclh i2scll 8 status decoder status bus status register 8 i2stat
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 38 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.22 spi the p89lpc9408 provides another high-speed serial communication interfacethe spi interface. spi is a full-duplex, high-speed, synchronous communication bus with two operation modes: master mode and slave mode. up to 4.5 mbit/s can be supported in master mode or up to 3 mbit/s in slave mode. it has a transfer completion ?ag and write collision ?ag protection. the spi interface has three pins: spiclk, mosi, and miso: ? spiclk, mosi and miso are typically tied together between two or more spi devices. data ?ows from master to slave on mosi (master out slave in) pin and ?ows from slave to master on miso (master in slave out) pin. the spiclk signal is output in the master mode and is input in the slave mode. if the spi system is disabled, i.e., spen (spctl.6) = 0 (reset value), these pins are con?gured for port functions. typical connections are shown in figure 16 through figure 18 . fig 15. spi block diagram 002aab466 cpu clock divider by 4, 16, 64, 128 select clock logic spi control register read data buffer 8-bit shift register spi control spi status register spr1 spif wcol spr0 spi clock (master) pin control logic s m s m m s miso p2.3 mosi p2.2 spiclk p2.5 spi interrupt request internal data bus ssig spen spen mstr dord mstr cpha cpol spr1 spr0 mstr spen clock
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 39 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.22.1 typical spi con?gurations fig 16. spi single master single slave con?guration fig 17. spi dual device con?guration, where either can be a master or a slave 002aab467 master slave 8-bit shift register spi clock generator 8-bit shift register miso mosi spiclk ss/port miso mosi spiclk ss/port 002aab468 master slave 8-bit shift register spi clock generator spi clock generator 8-bit shift register miso mosi spiclk miso mosi spiclk ss/port ss/port
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 40 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.23 analog comparators two analog comparators are provided on the p89lpc9408. input and output options allow use of the comparators in a number of different con?gurations. comparator operation is such that the output is a logic 1 (which may be read in a register and/or routed to a pin) when the positive input (one of two selectable pins) is greater than the negative input (selectable from a pin or an internal reference voltage). otherwise the output is a zero. each comparator may be con?gured to cause an interrupt when the output value changes. the overall connections to both comparators are shown in figure 19 . the comparators function to v dd = 2.4 v. when each comparator is ?rst enabled, the comparator output and interrupt ?ag are not guaranteed to be stable for 10 microseconds. the corresponding comparator interrupt should not be enabled during that time, and the comparator interrupt ?ag must be cleared before the interrupt is enabled in order to prevent an immediate interrupt service. fig 18. spi single master multiple slaves con?guration 002aaa903 master slave 8-bit shift register spi clock generator 8-bit shift register miso mosi spiclk port port miso mosi spiclk ss slave 8-bit shift register miso mosi spiclk ss
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 41 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.23.1 internal reference voltage an internal reference voltage generator may supply a default reference when a single comparator input pin is used. the value of the internal reference voltage, referred to as v ref(bg) , is 1.23 v 10 %. 7.23.2 comparator interrupt each comparator has an interrupt ?ag contained in its con?guration register. this ?ag is set whenever the comparator output changes state. the ?ag may be polled by software or may be used to generate an interrupt. the two comparators use one common interrupt vector. if both comparators enable interrupts, after entering the interrupt service routine, the user needs to read the ?ags to determine which comparator caused the interrupt. 7.23.3 comparators and power reduction modes either or both comparators may remain enabled when power-down or idle mode is activated, but both comparators are disabled automatically in total power-down mode. if a comparator interrupt is enabled (except in total power-down mode), a change of the comparator output state will generate an interrupt and wake up the processor. if the comparator output to a pin is enabled, the pin should be con?gured in the push-pull mode in order to obtain fast switching times while in power-down mode. the reason is that with the oscillator stopped, the temporary strong pull-up that normally occurs during switching on a quasi-bidirectional port pin does not take place. comparators consume power in power-down and idle modes, as well as in the normal operating mode. this fact should be taken into account when system power consumption is an issue. to minimize power consumption, the user can disable the comparators via pcona.5, or put the device in total power-down mode. fig 19. comparator input and output connections comparator 1 cp1 cn1 (p0.4) cin1a (p0.3) cin1b (p0.5) cmpref v ref(bg) oe1 change detect co1 cmf1 interrupt 002aaa904 cmp1 (p0.6) ec change detect cmf2 comparator 2 oe2 co2 cmp2 (p0.0) cp2 cn2 (p0.2) cin2a (p0.1) cin2b
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 42 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.24 keypad interrupt (kbi) the keypad interrupt function is intended primarily to allow a single interrupt to be generated when port 0 is equal to or not equal to a certain pattern. this function can be used for bus address recognition or keypad recognition. the user can con?gure the port via sfrs for different tasks. the keypad interrupt mask register (kbmask) is used to de?ne which input pins connected to port 0 can trigger the interrupt. the keypad pattern register (kbpatn) is used to de?ne a pattern that is compared to the value of port 0. the keypad interrupt flag (kbif) in the keypad interrupt control register (kbcon) is set when the condition is matched while the keypad interrupt function is active. an interrupt will be generated if enabled. the patn_sel bit in the keypad interrupt control register (kbcon) is used to de?ne equal or not-equal for the comparison. in order to use the keypad interrupt as an original kbi function like in 87lpc76x series, the user needs to set kbpatn = 0ffh and patn_sel = 1 (not equal), then any key connected to port 0 which is enabled by the kbmask register will cause the hardware to set kbif and generate an interrupt if it has been enabled. the interrupt may be used to wake up the cpu from idle or power-down modes. this feature is particularly useful in handheld, battery-powered systems that need to carefully manage power consumption yet also need to be convenient to use. in order to set the ?ag and cause an interrupt, the pattern on port 0 must be held longer than six cclks. 7.25 watchdog timer the watchdog timer causes a system reset when it under?ows as a result of a failure to feed the timer prior to the timer reaching its terminal count. it consists of a programmable 12-bit prescaler, and an 8-bit down counter. the down counter is decremented by a tap taken from the prescaler. the clock source for the prescaler is either the pclk or the nominal 400 khz watchdog oscillator. the watchdog timer can only be reset by a power-on reset. when the watchdog feature is disabled, it can be used as an interval timer and may generate an interrupt. figure 20 shows the watchdog timer in watchdog mode. feeding the watchdog requires a two-byte sequence. if pclk is selected as the watchdog clock and the cpu is powered-down, the watchdog is disabled. the watchdog timer has a time-out period that ranges from a few m s to a few seconds. please refer to the p89lpc9408 user manual for more details.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 43 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.26 additional features 7.26.1 software reset the srst bit in auxr1 gives software the opportunity to reset the processor completely, as if an external reset or watchdog reset had occurred. care should be taken when writing to auxr1 to avoid accidental software resets. 7.26.2 dual data pointers the dual data pointers (dptr) provides two different data pointers to specify the address used with certain instructions. the dps bit in the auxr1 register selects one of the two data pointers. bit 2 of auxr1 is permanently wired as a logic 0 so that the dps bit may be toggled (thereby switching data pointers) simply by incrementing the auxr1 register, without the possibility of inadvertently altering other bits in the register. 7.27 lcd controller 7.27.1 general description the lcd segment driver in the p89lpc9408 can interface to most lcds using low multiplex rates. it generates the drive signals for static or multiplexed lcds containing up to four backplanes and up to 32 segments. the lcd controller communicates to a host using the i 2 c-bus. the i 2 c-bus clock and data signals for both the microcontroller and the lcd controller are available on the p89lpc9408 providing system ?exibility. communication overhead to manage the display is minimized by an on-chip display ram with auto-increment addressing, hardware subaddressing, and display memory switching (static and duplex drive modes). (1) watchdog reset can also be caused by an invalid feed sequence, or by writing to wdcon not immediately followed by a feed sequence. fig 20. watchdog timer in watchdog mode (wdte = 1) pre2 pre1 pre0 - - wdrun wdtof wdclk wdcon (a7h) shadow register prescaler 002aaa905 8-bit down counter wdl (c1h) watchdog oscillator pclk ? 32 mov wfeed1, #0a5h mov wfeed2, #05ah reset (1)
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 44 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.27.2 functional description the lcd controller is a versatile peripheral device designed to interface microcontrollers to a wide variety of lcds. it can directly drive any static or multiplexed lcd containing up to four backplanes and up to 32 segments. the display con?gurations possible with the lcd controller depend on the number of active backplane outputs required. a selection of display con?gurations is shown in t ab le 8 . all of these con?gurations can be implemented in a typical system. the microcontroller communicates to the lcd controller using the i 2 c-bus.the appropriate biasing voltages for the multiplexed lcd waveforms are generated internally. the only other connections required to complete the system are to the power supplies (v dd , v ss and v lcd ) and the lcd panel chosen for the application. 7.27.3 lcd bias voltages lcd biasing voltages are obtained from an internal voltage divider consisting of three series resistors connected between v lcd and v ss . the lcd voltage can be temperature compensated externally via the supply to pin v lcd . a voltage selector drives the multiplexing of the lcd based on programmable con?gurations. 7.27.4 oscillator an internal oscillator provides the clock signals for the internal logic of the lcd controller and its lcd drive signals. after power-up, pin sda must be high to guarantee that the clock starts. 7.27.5 timing the lcd controller timing controls the internal data ?ow of the device. this includes the transfer of display data from the display ram to the display segment outputs. the timing also generates the lcd frame signal whose frequency is derived from the clock frequency. the frame signal frequency is a ?xed division of the clock frequency from either the internal or an external clock. frame frequency = f clk /24. 7.27.6 display register a display latch holds the display data while the corresponding multiplex signals are generated. there is a one-to-one relationship between the data in the display latch, the lcd segment outputs, and each column of the display ram. table 8: selection of display con?gurations number of 7-segments numeric 14- segments alphanumeric dot matrix back planes segments digits indicator symbols characters indicator symbols 4 128 16 16 8 16 128 3 9612126 1296 264884864 132442432
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 45 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.27.7 segment outputs the lcd drive section includes 32 segment outputs s0 to s31. the segment output signals are generated according to the multiplexed backplane signals and the display latch data. when less than 32 segment outputs are required, the unused segment outputs should be left open-circuit. 7.27.8 backplane outputs the lcd drive section has four backplane outputs bp0 to bp3. the backplane output signals are generated based on the selected lcd drive mode. if less than four backplane outputs are required, the unused outputs can be left open-circuit. in the 1:3 multiplex drive mode, bp3 carries the same signal as bp1, therefore these two adjacent outputs can be tied together to give enhanced drive capabilities. in the 1:2 multiplex drive mode, bp0 and bp2, bp1 and bp3 respectively carry the same signals and may also be paired to increase the drive capabilities. in the static drive mode the same signal is carried by all four backplane outputs and they can be connected in parallel for very high drive requirements. 7.27.9 display ram the display ram is a static 32 4-bit ram which stores lcd data. there is a one-to-one correspondence between the ram addresses and the segment outputs, and between the individual bits of a ram word and the backplane outputs. the ?rst ram column corresponds to the 32 segments for backplane 0 (bp0). in multiplexed lcd applications the segment data of the second, third and fourth column of the display ram are time-multiplexed with bp1, bp2 and bp3 respectively. 7.27.10 data pointer the display ram is addressed using the data pointer. either a single byte or a series of display bytes may be loaded into any location of the display ram. 7.27.11 output bank selector the lcd controller includes a ram bank switching feature in the static and 1:2 drive modes. in the static drive mode, the bank select command may request the contents of bit 2 to be selected for display instead of the contents of bit 0. in 1:2 mode, the contents of bits 2 and 3 may be selected instead of bits 0 and 1. this allows display information to be prepared in an alternative bank and then selected for display when it is assembled. 7.27.12 input bank selector the input bank selector loads display data into the display ram based on the selected lcd drive con?guration. the bank select command can be used to load display data in bit 2 in static drive mode or in bits 2 and 3 in 1:2 mode. the input bank selector functions are independent of the output bank selector. 7.27.13 blinker the lcd controller has a very versatile display blinking capability. the whole display can blink at a frequency selected by the blink command. each blink frequency is a multiple integer value of the clock frequency; the ratio between the clock frequency and blink frequency depends on the blink mode selected, as shown in t ab le 9 .
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 46 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc an additional feature allows an arbitrary selection of lcd segments to be blinked in the static and 1:2 drive modes. this is implemented without any communication overheads by the output bank selector which alternates the displayed data between the data in the display ram bank and the data in an alternative ram bank at the blink frequency. this mode can also be implemented by the blink command. the entire display can be blinked at a frequency other than the nominal blink frequency by sequentially resetting and setting the display enable bit e at the required rate using the mode set command. blink modes 0.5 hz, 1 hz and 2 hz, and nominal blink frequencies 0.5 hz, 1 hz and 2 hz correspond to an oscillator frequency (f osc(lcd) ) of 1536 hz at pin clk. the oscillator frequency range is 397 hz to 3046 hz. 7.27.13.1 i 2 c-bus controller the lcd controller acts as an i 2 c-bus slave receiver. in the p89lpc9408 the hardware subaddress inputs a0, a,1 and a2 are tied to v ss setting the hardware subaddress = 0. 7.27.14 input ?lters to enhance noise immunity in electrically adverse environments, rc low-pass ?lters are provided on the sda and scl lines. 7.27.15 i 2 c-bus slave addresses the i 2 c-bus slave address is 0111 0000. the lcd controller is a write-only device and will not respond to a read access. 7.28 data eeprom the p89lpc9408 has 512 bytes of on-chip data eeprom. the data eeprom is sfr based, byte readable, byte writable, and erasable (via row ?ll and sector ?ll). the user can read, write and ?ll the memory via sfrs and one interrupt. this data eeprom provides 100,000 minimum erase/program cycles for each byte. ? byte mode: in this mode, data can be read and written one byte at a time. ? row fill: in this mode, the addressed row (64 bytes) is ?lled with a single value. the entire row can be erased by writing 00h. ? sector fill: in this mode, all 512 bytes are ?lled with a single value. the entire sector can be erased by writing 00h. after the operation ?nishes, the hardware will set the eeif bit, which if enabled will generate an interrupt. the ?ag is cleared by software. table 9: blinking frequencies blink mode normal operating mode ratio normal blink frequency off - blinking off 2hz f osc(lcd) /768 2 hz 1hz f osc(lcd) /1536 1 hz 0.5 hz f osc(lcd) /3072 0.5 hz
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 47 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.29 flash program memory 7.29.1 general description the p89lpc9408 ?ash memory provides in-circuit electrical erasure and programming. the ?ash can be erased, read, and written as bytes. the sector and page erase functions can erase any ?ash sector (1 kb) or page (64 bytes). the chip erase operation will erase the entire program memory. icp using standard commercial programmers is available. in addition, iap and byte-erase allows code memory to be used for non-volatile data storage. on-chip erase and write timing generation contribute to a user-friendly programming interface. the p89lpc9408 ?ash reliably stores memory contents even after 100,000 erase and program cycles. the cell is designed to optimize the erase and programming mechanisms. the p89lpc9408 uses v dd as the supply voltage to perform the program/erase algorithms. 7.29.2 features ? programming and erase over the full operating voltage range. ? byte erase allows code memory to be used for data storage. ? read/programming/erase using isp/iap/icp. ? internal ?xed boot rom, containing low-level iap routines available to user code. ? default loader providing isp via the serial port, located in upper end of user program memory. ? boot vector allows user-provided ?ash loader code to reside anywhere in the ?ash memory space, providing ?exibility to the user. ? any ?ash program or erase operation in 2 ms. ? programming with industry-standard commercial programmers. ? programmable security for the code in the ?ash for each sector. ? 100,000 typical erase/program cycles for each byte. ? 10 year minimum data retention. 7.29.3 flash organization the program memory consists of eight 1 kb sectors on the p89lpc9408 device. each sector can be further divided into 64-byte pages. in addition to sector erase, page erase, and byte erase, a 64-byte page register is included which allows from 1 to 64 bytes of a given page to be programmed at the same time, substantially reducing overall programming time. 7.29.4 using ?ash as data storage the ?ash code memory array of this device supports individual byte erasing and programming. any byte in the code memory array may be read using the movc instruction, provided that the sector containing the byte has not been secured (a movc instruction is not allowed to read code memory contents of a secured sector). thus any byte in a non-secured sector may be used for non-volatile data storage.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 48 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.29.5 flash programming and erasing four different methods of erasing or programming of the ?ash are available. the ?ash may be programmed or erased in the end-user application (iap) under control of the applications ?rmware. another option is to use the icp mechanism. this icp system provides for programming through a serial clock - serial data interface. as shipped from the factory, the upper 512 bytes of user code space contains a serial isp routine allowing for the device to be programmed in circuit through the serial port. the ?ash may also be programmed or erased using a commercially available eprom programmer which supports this device. this device does not provide for direct veri?cation of code memory contents. instead, this device provides a 32-bit crc result on either a sector or the entire user code space. 7.29.6 in-circuit programming in-circuit programming is performed without removing the microcontroller from the system. the icp facility consists of internal hardware resources to facilitate remote programming of the p89lpc9408 through a two-wire serial interface. the philips icp facility has made icp in an embedded applicationusing commercially available programmerspossible with a minimum of additional expense in components and circuit board area. the icp function uses ?ve pins. only a small connector needs to be available to interface your application to a commercial programmer in order to use this feature. additional details may be found in the p89lpc9408 user manual . 7.29.7 in-application programming in-application programming is performed in the application under the control of the microcontrollers ?rmware. the iap facility consists of internal hardware resources to facilitate programming and erasing. the philips iap has made iap in an embedded application possible without additional components. two methods are available to accomplish iap. a set of prede?ned iap functions are provided in a boot rom and can be called through a common interface, pgm_mtp. several iap calls are available for use by an application program to permit selective erasing and programming of ?ash sectors, pages, security bits, con?guration bytes, and device id. these functions are selected by setting up the microcontrollers registers before making a call to pgm_mtp at ff03h. the boot rom occupies the program memory space at the top of the address space from ff00h to feffh, thereby not con?icting with the user program memory space. in addition, iap operations can be accomplished through the use of four sfrs consisting of a control/status register, a data register, and two address registers. additional details may be found in the p89lpc9408 user manual . 7.29.8 isp isp is performed without removing the microcontroller from the system. the isp facility consists of a series of internal hardware resources coupled with internal ?rmware to facilitate remote programming of the p89lpc9408 through the serial port. this ?rmware is provided by philips and embedded within each p89lpc9408 device. the philips isp facility has made isp in an embedded application possible with a minimum of additional expense in components and circuit board area. the isp function uses ?ve pins (v dd ,v ss , txd, rxd, and rst). only a small connector needs to be available to interface your application to an external circuit in order to use this feature.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 49 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.29.9 power-on reset code execution the p89lpc9408 contains two special ?ash elements: the boot vector and the boot status bit. following reset, the p89lpc9408 examines the contents of the boot status bit. if the boot status bit is set to zero, power-up execution starts at location 0000h, which is the normal start address of the users application code. when the boot status bit is set to a value other than zero, the contents of the boot vector are used as the high byte of the execution address and the low byte is set to 00h. t ab le 10 shows the factory default boot vector settings for these devices. note: these settings are different than the original p89lpc932. tools designed to support the p89lpc9408 should be used to program this device, such as flash magic version 1.98, or later. a factory-provided boot loader is preprogrammed into the address space indicated and uses the indicated boot loader entry point to perform isp functions. this code can be erased by the user. users who wish to use this loader should take precautions to avoid erasing the 1 kb sector that contains this boot loader. instead, the page erase function can be used to erase the ?rst eight 64-byte pages located in this sector. a custom boot loader can be written with the boot vector set to the custom boot loader, if desired. 7.29.10 hardware activation of the boot loader the boot loader can also be executed by forcing the device into isp mode during a power-on sequence (see the p89lpc9408 user manual for speci?c information). this has the same effect as having a non-zero status byte. this allows an application to be built that will normally execute user code but can be manually forced into isp operation. if the factory default setting for the boot vector (1fh) is changed, it will no longer point to the factory preprogrammed isp boot loader code. after programming the ?ash, the status byte should be programmed to zero in order to allow execution of the users application code beginning at address 0000h. 7.30 user con?guration bytes some user-con?gurable features of the p89lpc9408 must be de?ned at power-up and therefore cannot be set by the program after start of execution. these features are con?gured through the use of the ?ash byte ucfg1. please see the p89lpc9408 user manual for additional details. 7.31 user sector security bytes there are eight user sector security bytes on the p89lpc9408 device. each byte corresponds to one sector. please see the p89lpc9408 user manual for additional details. table 10: default boot vector values and isp entry points device default boot vector default boot loader entry point default boot loader code range 1 kb sector range p89lpc9408 1fh 1f00h 1e00h to 1fffh 1c00h to 1fffh
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 50 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 8. adc 8.1 general description the p89lpc9408 has a 10-bit, 8-channel multiplexed successive approximation analog-to-digital converter module. a block diagram of the adc is shown in figure 21 . the adc consists of an 8-input multiplexer which feeds a sample-and-hold circuit providing an input signal to one of two comparator inputs. the control logic in combination with the sar drives a digital-to-analog converter which provides the other input to the comparator. the output of the comparator is fed to the sar. 8.2 features n 10-bit, 8-channel multiplexed input, successive approximation adc. n eight result register pairs. n six operating modes u fixed channel, single conversion mode u fixed channel, continuous conversion mode u auto scan, single conversion mode u auto scan, continuous conversion mode u dual channel, continuous conversion mode u single step mode n three conversion start modes u timer triggered start u start immediately u edge triggered n 10-bit conversion time of 4 m s at an adc clock of 9 mhz n interrupt or polled operation n high and low boundary limits interrupt; selectable in or out-of-range n clock divider n power-down mode 8.3 block diagram fig 21. adc block diagram + C comp dac0 sar 8 input mux control logic cclk 002aab103
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 51 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 8.4 adc operating modes 8.4.1 fixed channel, single conversion mode a single input channel can be selected for conversion. a single conversion will be performed and the result placed in the result register pair which corresponds to the selected input channel. an interrupt, if enabled, will be generated after the conversion completes. 8.4.2 fixed channel, continuous conversion mode a single input channel can be selected for continuous conversion. the results of the conversions will be sequentially placed in the eight result register pairs. the user may select whether an interrupt can be generated after every four or every eight conversions. additional conversion results will again cycle through the result register pairs, overwriting the previous results. continuous conversions continue until terminated by the user. 8.4.3 auto scan, single conversion mode any combination of the eight input channels can be selected for conversion. a single conversion of each selected input will be performed and the result placed in the result register pair which corresponds to the selected input channel. the user may select whether an interrupt, if enabled, will be generated after either the ?rst four conversions have occurred or all selected channels have been converted. if the user selects to generate an interrupt after the four input channels have been converted, a second interrupt will be generated after the remaining input channels have been converted. if only a single channel is selected this is equivalent to single channel, single conversion mode. 8.4.4 auto scan, continuous conversion mode any combination of the eight input channels can be selected for conversion. a conversion of each selected input will be performed and the result placed in the result register pair which corresponds to the selected input channel. the user may select whether an interrupt, if enabled, will be generated after either the ?rst four conversions have occurred or all selected channels have been converted. if the user selects to generate an interrupt after the four input channels have been converted, a second interrupt will be generated after the remaining input channels have been converted. after all selected channels have been converted, the process will repeat starting with the ?rst selected channel. additional conversion results will again cycle through the eight result register pairs, overwriting the previous results. continuous conversions continue until terminated by the user. 8.4.5 dual channel, continuous conversion mode this is a variation of the auto scan continuous conversion mode where conversion occurs on two user-selectable inputs. the result of the conversion of the ?rst channel is placed in the result register pair, ad0dat0r and ad0dat0l. the result of the conversion of the second channel is placed in result register pair, ad0dat1r and ad0dat1l. the ?rst channel is again converted and its result stored in ad0dat2r and ad0dat2l. the second channel is again converted and its result placed in ad0dat3r and ad0dat3l, etc. an interrupt is generated, if enabled, after every set of four or eight conversions (user selectable).
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 52 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 8.4.6 single step mode this special mode allows single-stepping in an auto scan conversion mode. any combination of the eight input channels can be selected for conversion. after each channel is converted, an interrupt is generated, if enabled, and the adc waits for the next start condition. may be used with any of the start modes. 8.5 conversion start modes 8.5.1 timer triggered start the adc is started by the over?ow of timer 0. once a conversion has started, additional timer 0 triggers are ignored until the conversion has completed. the timer triggered start mode is available in all adc operating modes. 8.5.2 start immediately programming this mode immediately starts a conversion.this start mode is available in all adc operating modes. 8.5.3 edge triggered the adc is started by rising or falling edge of p1.4. once a conversion has started, additional edge triggers are ignored until the conversion has completed. the edge triggered start mode is available in all adc operating modes. 8.6 boundary limits interrupt the adc has both a high and low boundary limit register. the user may select whether an interrupt is generated when the conversion result is within (or equal to) the high and low boundary limits or when the conversion result is outside the boundary limits. an interrupt will be generated, if enabled, if the result meets the selected interrupt criteria. the boundary limit may be disabled by clearing the boundary limit interrupt enable. an early detection mechanism exists when the interrupt criteria has been selected to be outside the boundary limits. in this case, after the four msbs have been converted, these four bits are compared with the four msbs of the boundary high and low registers. if the four msbs of the conversion meet the interrupt criteria (i.e., outside the boundary limits) an interrupt will be generated, if enabled. if the four msbs do not meet the interrupt criteria, the boundary limits will again be compared after all 8 msbs have been converted. a boundary status register (bndsta0) ?ags the channels which caused a boundary interrupt. 8.7 clock divider the adc requires that its internal clock source be in the range of 500 khz to 3 mhz to maintain accuracy. a programmable clock divider that divides the clock from 1 to 8 is provided for this purpose. 8.8 power-down and idle mode in idle mode the adc, if enabled, will continue to function and can cause the device to exit idle mode when the conversion is completed if the adc interrupt is enabled. in power-down mode or total power-down mode, the adc does not function. if the adc is enabled, it will consume power. power can be reduced by disabling the adc.
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 53 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 9. limiting values [1] the following applies to t ab le 11 : a) this product includes circuitry speci?cally designed for the protection of its internal devices from the damaging effects of excessive static charge. nonetheless, it is suggested that conventional precautions be taken to avoid applying greater than the rated maximum. b) parameters are valid over operating temperature range unless otherwise speci?ed. all voltages are with respect to v ss unless otherwise noted. 10. static characteristics table 11: limiting values in accordance with the absolute maximum rating system (iec 60134). [1] symbol parameter conditions min max unit t amb(bias) bias ambient temperature - 55 +125 c t stg storage temperature - 65 +150 c i oh(i/o) high-state output current per input/output pin -20ma i ol(i/o) low-state output current per input/output pin -20ma i i/otot(max) maximum total input/output current - 100 ma v n voltage on any other pin except v ss , with respect to v dd - 3.5 v p tot(pack) total power dissipation (per package) based on package heat transfer, not device power consumption - 1.5 w table 12: static electrical characteristics v dd = 2.4 v to 3.6 v unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. symbol parameter conditions min typ [1] max unit i dd(oper) operating supply current v dd = 3.6 v; f osc =12mhz [2] -1115ma v dd = 3.6 v; f osc =18mhz [2] -1723ma i dd(idle) idle mode supply current 3.6 v; 12 mhz [2] - 3.7 5 ma 3.6 v; 18 mhz [2] -68ma i dd(pd) power-down mode supply current voltage comparators powered down; v dd = 3.6 v [2] -6085 m a i dd(tpd) total power-down mode supply current v dd = 3.6 v [3] -925 m a (dv/dt) r rise rate of v dd - - 2 mv/ m s (dv/dt) f fall rate of v dd - - 50 mv/ m s v ddr data retention supply voltage 1.5 - - v v th(hl) high-low threshold voltage except scl, sda 0.22v dd 0.4v dd -v v il low-state input voltage scl, sda only - 0.5 - +0.3v dd v v th(lh) low-high threshold voltage except scl, sda - 0.6v dd 0.7v dd v v ih high-state input voltage scl, sda only 0.7v dd - 5.5 v v hys hysteresis voltage port 1 - 0.2v dd -v
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 54 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] typical ratings are not guaranteed. the values listed are at room temperature, v dd = 3 v. [2] the i dd(oper) ,i dd(idle) , and i dd(pd) speci?cations are measured using an external clock with the following functions disabled: comparators, real-time clock, and watchdog timer. [3] the i dd(tpd) speci?cation is measured using an external clock with the following functions disabled: comparators, real-time clock, brownout detect, and watchdog timer. [4] see section 9 limiting v alues on page 53 for steady state (non-transient) limits on i ol or i oh . if i ol /i oh exceeds the test condition, v ol /v oh may exceed the related speci?cation. [5] pin capacitance is characterized but not tested. [6] measured with port in quasi-bidirectional mode. [7] measured with port in high-impedance mode. [8] port pins source a transition current when used in quasi-bidirectional mode and externally driven from logic 1 to logic 0. t his current is highest when v i is approximately 2 v. v ol low-state output voltage i ol =20ma; v dd = 2.4 v to 3.6 v, all ports, all modes except high-z [4] - 0.6 1.0 v i ol = 3.2 ma; v dd = 2.4 v to 3.6 v; all ports; all modes except high-z [4] - 0.2 0.3 v v oh high-state output voltage i oh = - 20 m a; v dd = 2.4 v to 3.6 v; all ports; quasi-bidirectional mode v dd - 0.3 v dd - 0.2 - v i oh = - 3.2 ma; v dd = 2.4 v to 3.6 v; all ports; push-pull mode v dd - 0.7 v dd - 0.4 - v v xtal crystal voltage with respect to v ss - 0.5 - +4.0 v v n voltage on any other pin except xtal1, xtal2, v dd ; with respect to v ss - 0.5 - +5.5 c i input capacitance [5] - - 15 pf i il low-state input current v i = 0.4 v [6] -- - 80 m a i li input leakage current v i =v il or v ih [7] -- 10 m a i thl high-low transition current v i = 1.5 v at v dd = 3.6 v [8] - 30 - - 450 m a r rst_n(int) internal pull-up resistance on pin rst_n 10 - 30 k w v bo brownout trip voltage 2.4 v < v dd < 3.6 v; with boe = 1, bopd = 0 2.40 - 2.70 v v ref(bg) band gap reference voltage 1.11 1.23 1.34 v tc bg band gap temperature coef?cient - 10 20 ppm/ c table 12: static electrical characteristics continued v dd = 2.4 v to 3.6 v unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. symbol parameter conditions min typ [1] max unit
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 55 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 11. dynamic characteristics table 13: dynamic characteristics (12 mhz) v dd = 2.4 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. [1] [2] symbol parameter conditions variable clock f osc =12mhz unit min max min max f osc(rc) internal rc oscillator frequency 7.189 7.557 7.189 7.557 mhz f osc(wd) internal watchdog oscillator frequency 320 520 320 520 khz f osc oscillator frequency 0 12 - - mhz t cy(clk) clock cycle time see figure 23 83 - - - ns f clklp low-power select clock frequency 0 8 - - mhz glitch ?lter t gr glitch rejection time p1.5/ rst pin - 50 - 50 ns any pin except p1.5/ rst - 15 - 15 ns t sa signal acceptance time p1.5/ rst pin 125 - 125 - ns any pin except p1.5/ rst 50 - 50 - ns external clock t chcx clock high time see figure 23 33 t cy(clk) - t clcx 33 - ns t clcx clock low time see figure 23 33 t cy(clk) - t chcx 33 - ns t clch clock rise time see figure 23 -8-8ns t chcl clock fall time see figure 23 -8-8ns shift register (uart mode 0) t xlxl serial port clock cycle time see figure 22 16t cy(clk) - 1333 - ns t qvxh output data setup to clock rising edge time see figure 22 13t cy(clk) - 1083 - ns t xhqx output data hold after clock rising edge time see figure 22 -t cy(clk) + 20 - 103 ns t xhdx input data hold after clock rising edge time see figure 22 -0-0ns t xhdv input data valid to clock rising edge time see figure 22 150 - 150 - ns spi interface f spi spi operating frequency slave 0 cclk 6 0 2.0 mhz master - cclk 4 - 3.0 mhz t spicyc spi cycle time see figure 24 , 25 , 26 , 27 slave 6 cclk - 500 - ns master 4 cclk - 333 - ns t spilead spi enable lead time see figure 26 , 27 slave 250 - 250 - ns t spilag spi enable lag time see figure 26 , 27 slave 250 - 250 - ns
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 56 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] parameters are valid over operating temperature range unless otherwise speci?ed. [2] parts are tested to 2 mhz, but are guaranteed to operate down to 0 hz. t spiclkh spiclk high time see figure 24 , 25 , 26 , 27 master 2 cclk - 165 - ns slave 3 cclk - 250 - ns t spiclkl spiclk low time see figure 24 , 25 , 26 , 27 master 2 cclk - 165 - ns slave 3 cclk - 250 - ns t spidsu spi data setup time see figure 24 , 25 , 26 , 27 100 - 100 - ns t spidh spi data hold time see figure 24 , 25 , 26 , 27 100 - 100 - ns t spia spi access time see figure 26 , 27 slave 0 120 0 120 ns t spidis spi disable time see figure 26 , 27 slave 0 240 - 240 ns t spidv spi enable to output data valid time see figure 24 , 25 , 26 , 27 slave - 240 - 240 ns master - 167 - 167 ns t spioh spi output data hold time see figure 24 , 25 , 26 , 27 0-0-ns t spir spi rise time see figure 24 , 25 , 26 , 27 spi outputs (spiclk, mosi, miso) - 100 - 100 ns spi inputs (spiclk, mosi, miso) - 2000 - 2000 ns t spif spi fall time see figure 24 , 25 , 26 , 27 spi outputs (spiclk, mosi, miso) - 100 - 100 ns spi inputs (spiclk, mosi, miso) - 2000 - 2000 ns table 13: dynamic characteristics (12 mhz) continued v dd = 2.4 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. [1] [2] symbol parameter conditions variable clock f osc =12mhz unit min max min max
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 57 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc table 14: dynamic characteristics (18 mhz) v dd = 3.0 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. [1] [2] symbol parameter conditions variable clock f osc =18mhz unit min max min max f osc(rc) internal rc oscillator frequency 7.189 7.557 7.189 7.557 mhz f osc(wd) internal watchdog oscillator frequency 320 520 320 520 khz f osc oscillator frequency 0 18 - - mhz t cy(clk) clock cycle time see figure 23 55 - - - ns f clklp low-power select clock frequency 0 8 - - mhz glitch ?lter t gr glitch rejection time p1.5/ rst pin - 50 - 50 ns any pin except p1.5/ rst - 15 - 15 ns t sa signal acceptance time p1.5/ rst pin 125 - 125 - ns any pin except p1.5/ rst 50 - 50 - ns external clock t chcx clock high time see figure 23 22 t cy(clk) - t clcx 22 - ns t clcx clock low time see figure 23 22 t cy(clk) - t chcx 22 - ns t clch clock rise time see figure 23 -5-5ns t chcl clock fall time see figure 23 -5-5ns shift register (uart mode 0) t xlxl serial port clock cycle time see figure 22 16t cy(clk) - 888 - ns t qvxh output data setup to clock rising edge time see figure 22 13t cy(clk) - 722 - ns t xhqx output data hold after clock rising edge time see figure 22 -t cy(clk) + 20 - 75 ns t xhdx input data hold after clock rising edge time see figure 22 -0-0ns t xhdv input data valid to clock rising edge time see figure 22 150 - 150 - ns spi interface f spi spi operating frequency slave 0 cclk 6 0 3.0 mhz master - cclk 4 - 4.5 mhz t spicyc spi cycle time see figure 24 , 25 , 26 , 27 slave 6 cclk - 333 - ns master 4 cclk - 222 - ns t spilead spi enable lead time see figure 26 , 27 slave 250 - 250 - ns t spilag spi enable lag time see figure 26 , 27 slave 250 - 250 - ns
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 58 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc [1] parameters are valid over operating temperature range unless otherwise speci?ed. [2] parts are tested to 2 mhz, but are guaranteed to operate down to 0 hz. t spiclkh spiclk high time see figure 24 , 25 , 26 , 27 master 2 cclk - 111 - ns slave 3 cclk - 167 - ns t spiclkl spiclk low time see figure 24 , 25 , 26 , 27 master 2 cclk - 111 - ns slave 3 cclk - 167 - ns t spidsu spi data setup time see figure 24 , 25 , 26 , 27 100 - 100 - ns t spidh spi data hold time see figure 24 , 25 , 26 , 27 100 - 100 - ns t spia spi access time see figure 26 , 27 slave 0 80 0 80 ns t spidis spi disable time see figure 26 , 27 slave 0 160 - 160 ns t spidv spi enable to output data valid time see figure 24 , 25 , 26 , 27 slave - 160 - 160 ns master - 111 - 111 ns t spioh spi output data hold time see figure 24 , 25 , 26 , 27 0-0-ns t spir spi rise time see figure 24 , 25 , 26 , 27 spi outputs (spiclk, mosi, miso) - 100 - 100 ns spi inputs (spiclk, mosi, miso, ss) - 2000 - 2000 ns t spif spi fall time see figure 24 , 25 , 26 , 27 spi outputs (spiclk, mosi, miso) - 100 - 100 ns spi inputs (spiclk, mosi, miso) - 2000 - 2000 ns table 14: dynamic characteristics (18 mhz) continued v dd = 3.0 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. [1] [2] symbol parameter conditions variable clock f osc =18mhz unit min max min max
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 59 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 11.1 waveforms fig 22. shift register mode timing 01234567 valid valid valid valid valid valid valid valid t xlxl 002aaa906 set ti set ri t xhqx t qvxh t xhdv t xhdx clock output data write to sbuf input data clear ri fig 23. external clock timing t chcl t clcx t chcx t cy(clk) t clch 002aaa907 0.2v dd + 0.9 v 0.2v dd - 0.1 v v dd - 0.5 v 0.45 v
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 60 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc fig 24. spi master timing (cpha = 0) t spicyc t spiclkh t spiclkh t spiclkl t spiclkl master lsb/msb out master msb/lsb out t spidh t spidsu t spif t spioh t spidv t spir t spidv t spif t spir t spif t spir ss spiclk (cpol = 0) (output) 002aaa908 spiclk (cpol = 1) (output) miso (input) mosi (output) lsb/msb in msb/lsb in fig 25. spi master timing (cpha = 1) t spicyc t spiclkl t spiclkl t spiclkh t spiclkh master lsb/msb out master msb/lsb out t spidh t spidsu t spif t spioh t spidv t spidv t spir t spidv t spif t spif t spir t spir ss spiclk (cpol = 0) (output) 002aaa909 spiclk (cpol = 1) (output) miso (input) mosi (output) lsb/msb in msb/lsb in
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 61 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc fig 26. spi slave timing (cpha = 0) t spicyc t spiclkh t spiclkh t spiclkl t spiclkl t spilead t spilag t spidsu t spidh t spidh t spidsu t spidsu t spir t spia t spioh t spidis t spir slave msb/lsb out msb/lsb in lsb/msb in slave lsb/msb out t spidv t spioh t spioh t spidv t spir t spir t spif t spif ss spiclk (cpol = 0) (input) 002aaa910 spiclk (cpol = 1) (input) miso (output) mosi (input) not defined fig 27. spi slave timing (cpha = 1) 002aaa911 t spicyc t spiclkh t spiclkh t spiclkl t spilead t spiclkl t spilag t spidsu t spidsu t spidsu t spidh t spidh t spir t spir t spir t spia t spioh t spioh t spioh t spidis slave msb/lsb out not defined msb/lsb in lsb/msb in slave lsb/msb out t spidv t spidv t spidv t spir t spif t spif ss spiclk (cpol = 0) (input) spiclk (cpol = 1) (input) miso (output) mosi (input)
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 62 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 11.2 isp entry mode 12. other characteristics 12.1 comparator electrical characteristics [1] this parameter is characterized, but not tested in production. table 15: dynamic characteristics, isp entry mode v dd = 2.4 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. symbol parameter conditions min typ max unit t vr v dd active to rst active delay time 50 - - m s t rh rst high time 1 - 32 m s t rl rst low time 1 - - m s fig 28. isp entry waveform 002aaa912 v dd rst t rl t vr t rh table 16: comparator electrical characteristics v dd = 2.4 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. symbol parameter conditions min typ max unit v io input offset voltage - - 20 mv v ic common-mode input voltage 0 - v dd - 0.3 v cmrr common-mode rejection ratio [1] -- - 50 db t res(tot) total response time - 250 500 ns t (ce-ov) chip enable to output valid time - - 10 m s i li input leakage current 0 v < v i p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 63 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 13. adc electrical characteristics table 17: adc electrical characteristics v dd = 2.4 v to 3.6 v, unless otherwise speci?ed. t amb = - 40 c to +85 c for industrial applications, unless otherwise speci?ed. all limits valid for an external source impedance of less than 10 k w . symbol parameter conditions min typ max unit v ia analog input voltage v ss - 0.2 - v ss + 0.2 v c ia analog input capacitance - - 15 pf e d differential linearity error - - 1 lsb inl integral non-linearity - - 1 lsb e offset offset error - - 2 lsb e g gain error - - 1% e u(tot) total unadjusted error - - 2 lsb m ctc channel-to-channel matching - - 1 lsb a ct(port) crosstalk between port inputs 0 khz to 100 khz - - - 60 db sr in input slew rate - - 100 v/ms t cy(adc) adc clock cycle time 111 - 3125 ns t adc adc conversion time adc enabled - - 36t cy(adc) m s
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 64 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 14. package outline fig 29. package outline sot791-1 (lqfp64) unit a max. a 1 a 2 a 3 b p ce (1) eh e ll p z y w v q references outline version european projection issue date iec jedec jeita mm 1.6 0.15 0.05 1.45 1.35 0.25 0.45 0.30 0.20 0.09 14.1 13.9 0.8 16.15 15.85 1.2 0.8 7 0 o o 0.2 0.1 0.2 1 dimensions (mm are the original dimensions) note 1. plastic or metal protrusions of 0.25 mm maximum per side are not included. 0.75 0.45 sot791-1 136e18 ms-026 ed-7311ec 02-10-22 d (1) (1) (1) 14.1 13.9 h d 16.15 15.85 e z 1.2 0.8 d b p e q e a 1 a l p detail x l (a ) 3 b 16 c d h b p e h a 2 v m b d z d a z e e v m a x 1 64 49 48 33 32 17 y pin 1 index w m w m 0 5 10 mm scale lqfp64: plastic low profile quad flat package; 64 leads; body 14 x 14 x 1.4 mm sot791-1
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 65 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 15. abbreviations table 18: acronym list acronym description adc analog to digital converter cpu central processing unit eprom erasable programmable read-only memory eeprom electrically erasable programmable read-only memory emi electro-magnetic interference isp in-system programming lcd liquid crystal display led light emitting diode pwm pulse width modulator ram random access memory rc resistance-capacitance sfr special function register spi serial peripheral interface uart universal asynchronous receiver/transmitter
p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 66 of 69 philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 16. revision history table 19: revision history document id release date data sheet status change notice doc. number supersedes p89lpc9408_1 20051216 product data sheet - - -
philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 67 of 69 17. data sheet status [1] please consult the most recently issued data sheet before initiating or completing a design. [2] the product status of the device(s) described in this data sheet may have changed since this data sheet was published. the l atest information is available on the internet at url http://www.semiconductors.philips.com. [3] for data sheets describing multiple type numbers, the highest-level product status determines the data sheet status. 18. de?nitions short-form speci?cation the data in a short-form speci?cation is extracted from a full data sheet with the same type number and title. for detailed information see the relevant data sheet or data handbook. limiting values de?nition limiting values given are in accordance with the absolute maximum rating system (iec 60134). stress above one or more of the limiting values may cause permanent damage to the device. these are stress ratings only and operation of the device at these or at any other conditions above those given in the characteristics sections of the speci?cation is not implied. exposure to limiting values for extended periods may affect device reliability. application information applications that are described herein for any of these products are for illustrative purposes only. philips semiconductors makes no representation or warranty that such applications will be suitable for the speci?ed use without further testing or modi?cation. 19. disclaimers life support these products are not designed for use in life support appliances, devices, or systems where malfunction of these products can reasonably be expected to result in personal injury. philips semiconductors customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify philips semiconductors for any damages resulting from such application. right to make changes philips semiconductors reserves the right to make changes in the products - including circuits, standard cells, and/or software - described or contained herein in order to improve design and/or performance. when the product is in full production (status production), relevant changes will be communicated via a customer product/process change noti?cation (cpcn). philips semiconductors assumes no responsibility or liability for the use of any of these products, conveys no license or title under any patent, copyright, or mask work right to these products, and makes no representations or warranties that these products are free from patent, copyright, or mask work right infringement, unless otherwise speci?ed. 20. trademarks notice all referenced brands, product names, service names and trademarks are the property of their respective owners. i 2 c-bus logo is a trademark of koninklijke philips electronics n.v. 21. contact information for additional information, please visit: http://www.semiconductors.philips.com for sales of?ce addresses, send an email to: sales.addresses@www.semiconductors.philips.com level data sheet status [1] product status [2] [3] de?nition i objective data development this data sheet contains data from the objective speci?cation for product development. philips semiconductors reserves the right to change the speci?cation in any manner without notice. ii preliminary data quali?cation this data sheet contains data from the preliminary speci?cation. supplementary data will be published at a later date. philips semiconductors reserves the right to change the speci?cation without notice, in order to improve the design and supply the best possible product. iii product data production this data sheet contains data from the product speci?cation. philips semiconductors reserves the right to make changes at any time in order to improve the design, manufacturing and supply. relevant changes will be communicated via a customer product/process change noti?cation (cpcn).
philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc p89lpc9408_1 ? koninklijke philips electronics n.v. 2005. all rights reserved. product data sheet rev. 01 16 december 2005 68 of 69 continued >> 22. contents 1 general description . . . . . . . . . . . . . . . . . . . . . . 1 2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.1 principal features . . . . . . . . . . . . . . . . . . . . . . . 1 2.2 additional features . . . . . . . . . . . . . . . . . . . . . . 1 3 ordering information . . . . . . . . . . . . . . . . . . . . . 3 3.1 ordering options . . . . . . . . . . . . . . . . . . . . . . . . 3 4 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 functional diagram . . . . . . . . . . . . . . . . . . . . . . 5 6 pinning information . . . . . . . . . . . . . . . . . . . . . . 6 6.1 pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . 6 7 functional description . . . . . . . . . . . . . . . . . . 10 7.1 special function registers . . . . . . . . . . . . . . . . 10 7.2 enhanced cpu . . . . . . . . . . . . . . . . . . . . . . . . 19 7.3 clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7.3.1 clock de?nitions . . . . . . . . . . . . . . . . . . . . . . . 19 7.3.2 cpu clock (oscclk). . . . . . . . . . . . . . . . . . . 19 7.3.3 low speed oscillator option . . . . . . . . . . . . . . 19 7.3.4 medium speed oscillator option . . . . . . . . . . . 19 7.3.5 high speed oscillator option . . . . . . . . . . . . . . 19 7.3.6 clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.4 on-chip rc oscillator option . . . . . . . . . . . . . . 20 7.5 watchdog oscillator option . . . . . . . . . . . . . . . 20 7.6 external clock input option . . . . . . . . . . . . . . . 20 7.7 cpu clock (cclk) wake-up delay . . . . . . . . . 21 7.8 cclk modi?cation: divm register . . . . . . . . . 21 7.9 low power select . . . . . . . . . . . . . . . . . . . . . . 21 7.10 memory organization . . . . . . . . . . . . . . . . . . . 22 7.11 data ram arrangement . . . . . . . . . . . . . . . . . 22 7.12 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.12.1 external interrupt inputs . . . . . . . . . . . . . . . . . 23 7.13 i/o ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.13.1 port con?gurations . . . . . . . . . . . . . . . . . . . . . 25 7.13.1.1 quasi-bidirectional output con?guration . . . . . 25 7.13.1.2 open-drain output con?guration . . . . . . . . . . . 25 7.13.1.3 input-only con?guration . . . . . . . . . . . . . . . . . 25 7.13.1.4 push-pull output con?guration . . . . . . . . . . . . 26 7.13.2 port 0 analog functions . . . . . . . . . . . . . . . . . . 26 7.13.3 additional port features. . . . . . . . . . . . . . . . . . 26 7.14 power monitoring functions. . . . . . . . . . . . . . . 26 7.14.1 brownout detection . . . . . . . . . . . . . . . . . . . . . 26 7.14.2 power-on detection . . . . . . . . . . . . . . . . . . . . . 27 7.15 power reduction modes . . . . . . . . . . . . . . . . . 27 7.15.1 idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.15.2 power-down mode . . . . . . . . . . . . . . . . . . . . . 27 7.15.3 total power-down mode . . . . . . . . . . . . . . . . . 27 7.16 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.16.1 reset vector . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7.17 timers/counters 0 and 1 . . . . . . . . . . . . . . . . 28 7.17.1 mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.17.2 mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.17.3 mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.17.4 mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.17.5 mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.17.6 timer over?ow toggle output . . . . . . . . . . . . . 29 7.18 rtc/system timer. . . . . . . . . . . . . . . . . . . . . . 29 7.19 ccu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.19.1 ccu clock (ccuclk) . . . . . . . . . . . . . . . . . . 30 7.19.2 ccu clock prescaling . . . . . . . . . . . . . . . . . . . 30 7.19.3 basic timer operation . . . . . . . . . . . . . . . . . . . 30 7.19.4 output compare . . . . . . . . . . . . . . . . . . . . . . . 30 7.19.5 input capture . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.19.6 pwm operation . . . . . . . . . . . . . . . . . . . . . . . 30 7.19.7 alternating output mode . . . . . . . . . . . . . . . . . 32 7.19.8 pll operation. . . . . . . . . . . . . . . . . . . . . . . . . 32 7.19.9 ccu interrupts . . . . . . . . . . . . . . . . . . . . . . . . 33 7.20 uart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.20.1 mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.20.2 mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.20.3 mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.20.4 mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.20.5 baud rate generator and selection . . . . . . . . . 34 7.20.6 framing error . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.20.7 break detect . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.20.8 double buffering . . . . . . . . . . . . . . . . . . . . . . . 35 7.20.9 transmit interrupts with double buffering enabled (modes 1, 2 and 3) . . . . . . . . . . . . . . 35 7.20.10 the 9 th bit (bit 8) in double buffering (modes 1, 2 and 3) . . . . . . . . . . . . . . . . . . . . . 35 7.21 i 2 c-bus serial interface. . . . . . . . . . . . . . . . . . 35 7.22 spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 7.22.1 typical spi con?gurations . . . . . . . . . . . . . . . 39 7.23 analog comparators . . . . . . . . . . . . . . . . . . . . 40 7.23.1 internal reference voltage. . . . . . . . . . . . . . . . 41 7.23.2 comparator interrupt . . . . . . . . . . . . . . . . . . . 41 7.23.3 comparators and power reduction modes . . . 41 7.24 keypad interrupt (kbi) . . . . . . . . . . . . . . . . . . 42 7.25 watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 42 7.26 additional features . . . . . . . . . . . . . . . . . . . . . 43 7.26.1 software reset . . . . . . . . . . . . . . . . . . . . . . . . 43 7.26.2 dual data pointers . . . . . . . . . . . . . . . . . . . . . 43 7.27 lcd controller . . . . . . . . . . . . . . . . . . . . . . . . 43 7.27.1 general description . . . . . . . . . . . . . . . . . . . . 43 7.27.2 functional description . . . . . . . . . . . . . . . . . . 44 7.27.3 lcd bias voltages . . . . . . . . . . . . . . . . . . . . . 44
? koninklijke philips electronics n.v. 2005 all rights are reserved. reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. the information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. no liability will be accepted by the publisher for any consequence of its use. publication thereof does not convey nor imply any license under patent- or other industrial or intellectual property rights. date of release: 16 december 2005 document number: p89lpc9408_1 published in the netherlands philips semiconductors p89lpc9408 8-bit two-clock 80c51 core with 32 segment 4 lcd driver, 10-bit adc 7.27.4 oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 7.27.5 timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 7.27.6 display register . . . . . . . . . . . . . . . . . . . . . . . . 44 7.27.7 segment outputs. . . . . . . . . . . . . . . . . . . . . . . 45 7.27.8 backplane outputs . . . . . . . . . . . . . . . . . . . . . 45 7.27.9 display ram . . . . . . . . . . . . . . . . . . . . . . . . . . 45 7.27.10 data pointer . . . . . . . . . . . . . . . . . . . . . . . . . . 45 7.27.11 output bank selector. . . . . . . . . . . . . . . . . . . . 45 7.27.12 input bank selector . . . . . . . . . . . . . . . . . . . . . 45 7.27.13 blinker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 7.27.13.1 i 2 c-bus controller . . . . . . . . . . . . . . . . . . . . . . 46 7.27.14 input ?lters . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.27.15 i 2 c-bus slave addresses . . . . . . . . . . . . . . . . . 46 7.28 data eeprom . . . . . . . . . . . . . . . . . . . . . . . . 46 7.29 flash program memory. . . . . . . . . . . . . . . . . . 47 7.29.1 general description. . . . . . . . . . . . . . . . . . . . . 47 7.29.2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7.29.3 flash organization . . . . . . . . . . . . . . . . . . . . . 47 7.29.4 using ?ash as data storage . . . . . . . . . . . . . . 47 7.29.5 flash programming and erasing . . . . . . . . . . . 48 7.29.6 in-circuit programming. . . . . . . . . . . . . . . . . . 48 7.29.7 in-application programming . . . . . . . . . . . . . . 48 7.29.8 isp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.29.9 power-on reset code execution. . . . . . . . . . . . 49 7.29.10 hardware activation of the boot loader . . . . . . 49 7.30 user con?guration bytes . . . . . . . . . . . . . . . . . 49 7.31 user sector security bytes . . . . . . . . . . . . . . . 49 8 adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.1 general description. . . . . . . . . . . . . . . . . . . . . 50 8.2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.3 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.4 adc operating modes . . . . . . . . . . . . . . . . . . 51 8.4.1 fixed channel, single conversion mode . . . . . 51 8.4.2 fixed channel, continuous conversion mode . 51 8.4.3 auto scan, single conversion mode . . . . . . . . 51 8.4.4 auto scan, continuous conversion mode . . . . 51 8.4.5 dual channel, continuous conversion mode . . 51 8.4.6 single step mode . . . . . . . . . . . . . . . . . . . . . . 52 8.5 conversion start modes . . . . . . . . . . . . . . . . . 52 8.5.1 timer triggered start . . . . . . . . . . . . . . . . . . . . 52 8.5.2 start immediately . . . . . . . . . . . . . . . . . . . . . . 52 8.5.3 edge triggered . . . . . . . . . . . . . . . . . . . . . . . . 52 8.6 boundary limits interrupt. . . . . . . . . . . . . . . . . 52 8.7 clock divider . . . . . . . . . . . . . . . . . . . . . . . . . . 52 8.8 power-down and idle mode . . . . . . . . . . . . . . 52 9 limiting values. . . . . . . . . . . . . . . . . . . . . . . . . 53 10 static characteristics. . . . . . . . . . . . . . . . . . . . 53 11 dynamic characteristics . . . . . . . . . . . . . . . . . 55 11.1 waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 11.2 isp entry mode. . . . . . . . . . . . . . . . . . . . . . . . 62 12 other characteristics . . . . . . . . . . . . . . . . . . . 62 12.1 comparator electrical characteristics . . . . . . . 62 13 adc electrical characteristics . . . . . . . . . . . . 63 14 package outline . . . . . . . . . . . . . . . . . . . . . . . . 64 15 abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . 65 16 revision history . . . . . . . . . . . . . . . . . . . . . . . 66 17 data sheet status. . . . . . . . . . . . . . . . . . . . . . . 67 18 de?nitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 19 disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 20 trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 21 contact information . . . . . . . . . . . . . . . . . . . . 67


▲Up To Search▲   

 
Price & Availability of P89LPC9408FBD

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X